-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yaml
79 lines (70 loc) · 2.36 KB
/
azure-pipelines.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
trigger:
branches:
include:
- "*"
parameters:
- name: deployEnvironments
type: object
default:
- name: "Test"
jobCondition: succeeded()
jobDependsOn: []
deployCondition: succeeded()
teardownCondition: succeeded()
- name: "Demo"
jobCondition: succeeded()
jobDependsOn: [Neo4J_Test]
deployCondition: succeeded()
teardownCondition: eq(1, 0)
- name: workingDirectory
default: $(Build.SourcesDirectory)
- name: preRelease
default: "a"
- name: azdoAgentPool
type: object
default:
vmImage: "ubuntu-latest"
- name: azureTestStageName
default: AzureTestStage
- name: azureTestStageDisplayName
default: 'Azure Test Stage'
- name: azureTestStageDependsOn
type: object
default: []
- name: azureTestStageCondition
default: succeeded()
- name: azureTestStageVariables
type: object
default: {}
stages:
- stage: ${{parameters.azureTestStageName}}
displayName: ${{parameters.azureTestStageDisplayName}}
dependsOn: ${{parameters.azureTestStageDependsOn}}
condition: ${{parameters.azureTestStageCondition}}
variables:
ARM_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
ARM_TENANT_ID: $(AZURE_TENANT_ID)
ARM_CLIENT_ID: $(SPA_APP_ID)
ARM_CLIENT_SECRET: $(SPA_PASSWORD)
${{ each pair in parameters.azureTestStageVariables }}:
${{pair.key}}: ${{pair.value}}
jobs:
- ${{ each environment in parameters.deployEnvironments }}:
- job: Neo4J_${{environment.name}}
pool: ${{parameters.azdoAgentPool}}
condition: ${{environment.jobCondition}}
displayName: "Neo4J ${{environment.name}}"
dependsOn: ${{environment.jobDependsOn}}
steps:
- checkout: self
displayName: 'Checkout repository'
- template: /templates/terraform-setup-step.yaml
- template: /templates/neo4j-deploy-step.yaml
parameters:
deployCondition: ${{environment.deployCondition}}
workingDirectory: ${{parameters.workingDirectory}}
testSteps: []
- template: /templates/neo4j-teardown-step.yaml
parameters:
teardownCondition: ${{environment.teardownCondition}}
workingDirectory: ${{parameters.workingDirectory}}