generated from SkillsFundingAgency/das-github-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
158 lines (146 loc) · 4.91 KB
/
azure-pipelines.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#REMEMBER: set the ApproveProdOverrideBlockOnPossibleDataLoss pipeline variable when connecting this pipeline, see Approve-SqlDacpacDeploymentDataLoss.ps1 docs for more info.
parameters:
- name: OverrideBlockOnPossibleDataLoss
displayName: Add /p:BlockOnPossibleDataLoss=false argument to DACPAC deployment
type: boolean
default: false
trigger:
batch: true
branches:
include:
- "main"
variables:
- name: SolutionBaseName
value: SFA.DAS.CandidateAccount
- name: BuildConfiguration
value: release
- name: BuildPlatform
value: any cpu
- group: RELEASE Management Resources
- group: RELEASE das-candidate-account-api
- name: Deploy
value: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['Build.Reason'], 'Manual'), eq(variables['Build.Reason'], 'PullRequest'))]
resources:
repositories:
- repository: self
- repository: das-platform-building-blocks
type: github
name: SkillsFundingAgency/das-platform-building-blocks
ref: refs/tags/2.1.28
endpoint: SkillsFundingAgency
- repository: das-platform-automation
type: github
name: SkillsFundingAgency/das-platform-automation
ref: refs/tags/5.1.8
endpoint: SkillsFundingAgency
pipelines:
- pipeline: das-employer-config
project: Digital Apprenticeship Service
source: das-employer-config
branch: master
stages:
- stage: Build
jobs:
- template: pipeline-templates/job/code-build.yml
parameters:
SolutionBaseName: $(SolutionBaseName)
BuildConfiguration: $(BuildConfiguration)
- template: azure-pipelines-templates/build/job/dacpaccs-template.yml@das-platform-building-blocks
parameters:
SolutionBaseName: $(SolutionBaseName)
DatabaseProjectPath: src/$(SolutionBaseName).Database/$(SolutionBaseName).Database.csproj
- stage: Deploy_AT
dependsOn: Build
displayName: Deploy to AT
condition: and(succeeded(), eq(variables.Deploy, 'true'))
variables:
- group: DevTest Management Resources
- group: AT DevTest Shared Resources
- group: AT das-candidate-account-api
jobs:
- template: pipeline-templates/job/deploy.yml
parameters:
Environment: AT
SolutionBaseName: $(SolutionBaseName)
ServiceConnection: SFA-DAS-DevTest-ARM
OverrideBlockOnPossibleDataLoss: ${{ parameters.OverrideBlockOnPossibleDataLoss }}
- stage: Deploy_TEST
dependsOn: Build
displayName: Deploy to TEST
variables:
- group: DevTest Management Resources
- group: TEST DevTest Shared Resources
jobs:
- template: pipeline-templates/job/deploy.yml
parameters:
Environment: TEST
SolutionBaseName: $(SolutionBaseName)
ServiceConnection: SFA-DAS-DevTest-ARM
OverrideBlockOnPossibleDataLoss: ${{ parameters.OverrideBlockOnPossibleDataLoss }}
- stage: Deploy_TEST2
dependsOn: Build
displayName: Deploy to TEST2
variables:
- group: DevTest Management Resources
- group: TEST2 DevTest Shared Resources
jobs:
- template: pipeline-templates/job/deploy.yml
parameters:
Environment: TEST2
SolutionBaseName: $(SolutionBaseName)
ServiceConnection: SFA-DAS-DevTest-ARM
OverrideBlockOnPossibleDataLoss: ${{ parameters.OverrideBlockOnPossibleDataLoss }}
- stage: Deploy_PP
dependsOn: Build
displayName: Deploy to PP
variables:
- group: PreProd Management Resources
- group: PreProd Shared Resources
- group: PREPROD das-candidate-account-api
jobs:
- template: pipeline-templates/job/deploy.yml
parameters:
Environment: PP
SolutionBaseName: $(SolutionBaseName)
ServiceConnection: SFA-DIG-PreProd-ARM
OverrideBlockOnPossibleDataLoss: ${{ parameters.OverrideBlockOnPossibleDataLoss }}
- stage: Deploy_PROD
dependsOn: Build
displayName: Deploy to PROD
variables:
- group: PROD Management Resources
- group: PROD Shared Resources
- group: PROD das-candidate-account-api
jobs:
- template: pipeline-templates/job/deploy.yml
parameters:
Environment: PROD
SolutionBaseName: $(SolutionBaseName)
ServiceConnection: SFA-DIG-Prod-ARM
OverrideBlockOnPossibleDataLoss: ${{ parameters.OverrideBlockOnPossibleDataLoss }}
- stage: Deploy_MO
dependsOn: Build
displayName: Deploy to MO
variables:
- group: MO Management Resources
- group: MO Shared Resources
jobs:
- template: pipeline-templates/job/deploy.yml
parameters:
Environment: MO
SolutionBaseName: $(SolutionBaseName)
ServiceConnection: SFA-ASM-ModelOffice-ARM
OverrideBlockOnPossibleDataLoss: ${{ parameters.OverrideBlockOnPossibleDataLoss }}
- stage: Deploy_DEMO
dependsOn: Build
displayName: Deploy to DEMO
variables:
- group: DevTest Management Resources
- group: DEMO DevTest Shared Resources
jobs:
- template: pipeline-templates/job/deploy.yml
parameters:
Environment: DEMO
SolutionBaseName: $(SolutionBaseName)
ServiceConnection: SFA-DAS-DevTest-ARM
OverrideBlockOnPossibleDataLoss: ${{ parameters.OverrideBlockOnPossibleDataLoss }}