This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrelease-pipeline.yml
68 lines (64 loc) · 2.5 KB
/
release-pipeline.yml
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
trigger: none
resources:
pipelines:
- pipeline: Build
source: 'nl-cdb-be-business-logic - CI'
trigger: # Run 'nl-cdb-be-business-logic - CD' pipeline when any run of 'nl-cdb-be-business-logic - CI' completes
branches:
include:
- main
- master
- release/*
- develop/*
pool: dockeragent
variables:
SERVICE_PRINCIPAL_NAME: '[AzureDevOps]-ServiceConnection'
WORKING_DIRECTORY: '$(Pipeline.Workspace)/Build/drop'
WORKING_DIRECTORY_DATABASE: '$(Pipeline.Workspace)/Build/business-logic-database'
stages:
- stage: Development
variables:
ENVIRONMENT: Development
jobs:
- template: templates/deploy-database.yml
parameters:
ENVIRONMENT: ${{ variables.ENVIRONMENT }}
AZURE_RM_SERVICE_PRINCIPAL_NAME: $(SERVICE_PRINCIPAL_NAME)
WORKING_DIRECTORY: $(WORKING_DIRECTORY_DATABASE)
- template: templates/deploy-configs.yml
parameters:
ENVIRONMENT: ${{ variables.ENVIRONMENT }}
AZURE_RM_SERVICE_PRINCIPAL_NAME: $(SERVICE_PRINCIPAL_NAME)
WORKING_DIRECTORY: $(WORKING_DIRECTORY)
- stage: Acceptance
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/heads/release')) # to be changed to refs/heads/master
dependsOn: [ Development ]
variables:
ENVIRONMENT: Acceptance
jobs:
- template: templates/deploy-database.yml
parameters:
ENVIRONMENT: ${{ variables.ENVIRONMENT }}
AZURE_RM_SERVICE_PRINCIPAL_NAME: $(SERVICE_PRINCIPAL_NAME)
WORKING_DIRECTORY: $(WORKING_DIRECTORY_DATABASE)
- template: templates/deploy-configs.yml
parameters:
ENVIRONMENT: ${{ variables.ENVIRONMENT }}
AZURE_RM_SERVICE_PRINCIPAL_NAME: $(SERVICE_PRINCIPAL_NAME)
WORKING_DIRECTORY: $(WORKING_DIRECTORY)
- stage: Production
condition: and(succeeded(), contains(variables['Build.SourceBranch'], 'refs/heads/release')) # to be changed to refs/heads/master
dependsOn: [ Acceptance ]
variables:
ENVIRONMENT: Production
jobs:
- template: templates/deploy-database.yml
parameters:
ENVIRONMENT: ${{ variables.ENVIRONMENT }}
AZURE_RM_SERVICE_PRINCIPAL_NAME: $(SERVICE_PRINCIPAL_NAME)
WORKING_DIRECTORY: $(WORKING_DIRECTORY_DATABASE)
- template: templates/deploy-configs.yml
parameters:
ENVIRONMENT: ${{ variables.ENVIRONMENT }}
AZURE_RM_SERVICE_PRINCIPAL_NAME: $(SERVICE_PRINCIPAL_NAME)
WORKING_DIRECTORY: $(WORKING_DIRECTORY)