Skip to content

Commit 104ec5a

Browse files
patrickmoore-ncstephhou
authored andcommitted
fix: DTOSS-10762 pipeline conditional logic (#1580)
* fix: DTOSS-10762 improve pipeline conditional logic * fix: DTOSS-10762 improve pipeline conditional logic
1 parent eff637e commit 104ec5a

8 files changed

Lines changed: 118 additions & 118 deletions

File tree

.azuredevops/templates/cd-infrastructure-core-common.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ stages:
4949

5050
- stage: terraform_deploy
5151
displayName: Terraform Deploy
52-
condition: |
52+
condition: |
5353
and(
5454
eq(variables['Build.Reason'], 'Manual'),
5555
in(dependencies.re_tag_stage.result, 'Succeeded', 'Skipped')
@@ -92,7 +92,7 @@ stages:
9292
eq(variables['Build.Reason'], 'Manual'),
9393
or(
9494
in(dependencies.re_tag_stage.result, 'Succeeded', 'Skipped'),
95-
in(dependencies.terraform_deploy.result, 'Succeeded', 'Skipped')
95+
eq(dependencies.terraform_deploy.result, 'Succeeded')
9696
)
9797
)
9898
pool:
@@ -117,7 +117,7 @@ stages:
117117
eq(variables['Build.Reason'], 'Manual'),
118118
or(
119119
in(dependencies.re_tag_stage.result, 'Succeeded', 'Skipped'),
120-
in(dependencies.terraform_deploy.result, 'Succeeded', 'Skipped'),
120+
eq(dependencies.terraform_deploy.result, 'Succeeded'),
121121
in(dependencies.db_changes_stage.result, 'Succeeded', 'Skipped')
122122
)
123123
)

infrastructure/tf-core/environments/development.tfvars

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ app_service_plan = {
147147
scaling_rule = {
148148
metric = "CpuPercentage"
149149

150-
capacity_max = "1"
151-
capacity_def = "1"
150+
capacity_max = "1"
151+
capacity_def = "1"
152152

153-
inc_scale_value = 1
154-
dec_scale_value = 1
153+
inc_scale_value = 1
154+
dec_scale_value = 1
155155

156156
}
157157
}
@@ -162,7 +162,7 @@ app_service_plan = {
162162
scaling_rule = {
163163
metric = "CpuPercentage"
164164

165-
capacity_max = "5"
165+
capacity_max = "5"
166166
inc_scale_value = 5
167167

168168
dec_scale_type = "ChangeCount"
@@ -176,11 +176,11 @@ app_service_plan = {
176176
scaling_rule = {
177177
metric = "CpuPercentage"
178178

179-
capacity_max = "1"
180-
capacity_def = "1"
179+
capacity_max = "1"
180+
capacity_def = "1"
181181

182-
inc_scale_value = 1
183-
dec_scale_value = 1
182+
inc_scale_value = 1
183+
dec_scale_value = 1
184184

185185
}
186186
}
@@ -191,7 +191,7 @@ app_service_plan = {
191191
scaling_rule = {
192192
metric = "CpuPercentage"
193193

194-
capacity_max = "5"
194+
capacity_max = "5"
195195
inc_scale_value = 5
196196

197197
dec_scale_type = "ChangeCount"
@@ -205,7 +205,7 @@ app_service_plan = {
205205
scaling_rule = {
206206
metric = "CpuPercentage"
207207

208-
capacity_max = "3"
208+
capacity_max = "3"
209209
inc_scale_value = 3
210210

211211
dec_scale_type = "ChangeCount"
@@ -1165,7 +1165,7 @@ linux_web_app = {
11651165
AUTH_TRUST_HOST = "true"
11661166
NEXTAUTH_URL = "https://cohort-dev.non-live.screening.nhs.uk/api/auth"
11671167
SERVICE_NAME = "Cohort Manager"
1168-
APP_ENV = "development"
1168+
APP_ENV = "development"
11691169
}
11701170
from_key_vault = {
11711171
# env_var_name = "key_vault_secret_name"

infrastructure/tf-core/environments/integration.tfvars

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ app_service_plan = {
147147
scaling_rule = {
148148
metric = "CpuPercentage"
149149

150-
capacity_max = "1"
151-
capacity_def = "1"
150+
capacity_max = "1"
151+
capacity_def = "1"
152152

153-
inc_scale_value = 1
154-
dec_scale_value = 1
153+
inc_scale_value = 1
154+
dec_scale_value = 1
155155

156156
}
157157
}
@@ -162,7 +162,7 @@ app_service_plan = {
162162
scaling_rule = {
163163
metric = "CpuPercentage"
164164

165-
capacity_max = "5"
165+
capacity_max = "5"
166166
inc_scale_value = 5
167167

168168
dec_scale_type = "ChangeCount"
@@ -176,11 +176,11 @@ app_service_plan = {
176176
scaling_rule = {
177177
metric = "CpuPercentage"
178178

179-
capacity_max = "1"
180-
capacity_def = "1"
179+
capacity_max = "1"
180+
capacity_def = "1"
181181

182-
inc_scale_value = 1
183-
dec_scale_value = 1
182+
inc_scale_value = 1
183+
dec_scale_value = 1
184184

185185
}
186186
}
@@ -191,7 +191,7 @@ app_service_plan = {
191191
scaling_rule = {
192192
metric = "CpuPercentage"
193193

194-
capacity_max = "5"
194+
capacity_max = "5"
195195
inc_scale_value = 5
196196

197197
dec_scale_type = "ChangeCount"
@@ -205,7 +205,7 @@ app_service_plan = {
205205
scaling_rule = {
206206
metric = "CpuPercentage"
207207

208-
capacity_max = "3"
208+
capacity_max = "3"
209209
inc_scale_value = 3
210210

211211
dec_scale_type = "ChangeCount"
@@ -351,8 +351,8 @@ function_apps = {
351351
}
352352
]
353353
env_vars_static = {
354-
MeshCertName = "MeshCert"
355-
BypassServerCertificateValidation = "true"
354+
MeshCertName = "MeshCert"
355+
BypassServerCertificateValidation = "true"
356356
}
357357
}
358358

infrastructure/tf-core/environments/nft.tfvars

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ app_service_plan = {
147147
scaling_rule = {
148148
metric = "CpuPercentage"
149149

150-
capacity_max = "1"
151-
capacity_def = "1"
150+
capacity_max = "1"
151+
capacity_def = "1"
152152

153-
inc_scale_value = 1
154-
dec_scale_value = 1
153+
inc_scale_value = 1
154+
dec_scale_value = 1
155155

156156
}
157157
}
@@ -162,7 +162,7 @@ app_service_plan = {
162162
scaling_rule = {
163163
metric = "CpuPercentage"
164164

165-
capacity_max = "5"
165+
capacity_max = "5"
166166
inc_scale_value = 5
167167

168168
dec_scale_type = "ChangeCount"
@@ -176,11 +176,11 @@ app_service_plan = {
176176
scaling_rule = {
177177
metric = "CpuPercentage"
178178

179-
capacity_max = "1"
180-
capacity_def = "1"
179+
capacity_max = "1"
180+
capacity_def = "1"
181181

182-
inc_scale_value = 1
183-
dec_scale_value = 1
182+
inc_scale_value = 1
183+
dec_scale_value = 1
184184

185185
}
186186
}
@@ -191,7 +191,7 @@ app_service_plan = {
191191
scaling_rule = {
192192
metric = "CpuPercentage"
193193

194-
capacity_max = "5"
194+
capacity_max = "5"
195195
inc_scale_value = 5
196196

197197
dec_scale_type = "ChangeCount"
@@ -205,7 +205,7 @@ app_service_plan = {
205205
scaling_rule = {
206206
metric = "CpuPercentage"
207207

208-
capacity_max = "3"
208+
capacity_max = "3"
209209
inc_scale_value = 3
210210

211211
dec_scale_type = "ChangeCount"
@@ -350,8 +350,8 @@ function_apps = {
350350
}
351351
]
352352
env_vars_static = {
353-
MeshCertName = "MeshCert"
354-
BypassServerCertificateValidation = "true"
353+
MeshCertName = "MeshCert"
354+
BypassServerCertificateValidation = "true"
355355
}
356356
}
357357

infrastructure/tf-core/environments/preprod.tfvars

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ app_service_plan = {
147147
scaling_rule = {
148148
metric = "CpuPercentage"
149149

150-
capacity_max = "1"
151-
capacity_def = "1"
150+
capacity_max = "1"
151+
capacity_def = "1"
152152

153-
inc_scale_value = 1
154-
dec_scale_value = 1
153+
inc_scale_value = 1
154+
dec_scale_value = 1
155155

156156
}
157157
}
@@ -162,7 +162,7 @@ app_service_plan = {
162162
scaling_rule = {
163163
metric = "CpuPercentage"
164164

165-
capacity_max = "5"
165+
capacity_max = "5"
166166
inc_scale_value = 5
167167

168168
dec_scale_type = "ChangeCount"
@@ -176,11 +176,11 @@ app_service_plan = {
176176
scaling_rule = {
177177
metric = "CpuPercentage"
178178

179-
capacity_max = "1"
180-
capacity_def = "1"
179+
capacity_max = "1"
180+
capacity_def = "1"
181181

182-
inc_scale_value = 1
183-
dec_scale_value = 1
182+
inc_scale_value = 1
183+
dec_scale_value = 1
184184

185185
}
186186
}
@@ -191,7 +191,7 @@ app_service_plan = {
191191
scaling_rule = {
192192
metric = "CpuPercentage"
193193

194-
capacity_max = "5"
194+
capacity_max = "5"
195195
inc_scale_value = 5
196196

197197
dec_scale_type = "ChangeCount"
@@ -205,7 +205,7 @@ app_service_plan = {
205205
scaling_rule = {
206206
metric = "CpuPercentage"
207207

208-
capacity_max = "3"
208+
capacity_max = "3"
209209
inc_scale_value = 3
210210

211211
dec_scale_type = "ChangeCount"
@@ -351,8 +351,8 @@ function_apps = {
351351
}
352352
]
353353
env_vars_static = {
354-
MeshCertName = "MeshCert"
355-
BypassServerCertificateValidation = "true"
354+
MeshCertName = "MeshCert"
355+
BypassServerCertificateValidation = "true"
356356
}
357357
}
358358

infrastructure/tf-core/environments/production.tfvars

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ app_service_plan = {
148148
scaling_rule = {
149149
metric = "CpuPercentage"
150150

151-
capacity_max = "1"
152-
capacity_def = "1"
151+
capacity_max = "1"
152+
capacity_def = "1"
153153

154-
inc_scale_value = 1
155-
dec_scale_value = 1
154+
inc_scale_value = 1
155+
dec_scale_value = 1
156156

157157
}
158158
}
@@ -163,7 +163,7 @@ app_service_plan = {
163163
scaling_rule = {
164164
metric = "CpuPercentage"
165165

166-
capacity_max = "5"
166+
capacity_max = "5"
167167
inc_scale_value = 5
168168

169169
dec_scale_type = "ChangeCount"
@@ -177,11 +177,11 @@ app_service_plan = {
177177
scaling_rule = {
178178
metric = "CpuPercentage"
179179

180-
capacity_max = "1"
181-
capacity_def = "1"
180+
capacity_max = "1"
181+
capacity_def = "1"
182182

183-
inc_scale_value = 1
184-
dec_scale_value = 1
183+
inc_scale_value = 1
184+
dec_scale_value = 1
185185

186186
}
187187
}
@@ -192,7 +192,7 @@ app_service_plan = {
192192
scaling_rule = {
193193
metric = "CpuPercentage"
194194

195-
capacity_max = "5"
195+
capacity_max = "5"
196196
inc_scale_value = 5
197197

198198
dec_scale_type = "ChangeCount"
@@ -206,7 +206,7 @@ app_service_plan = {
206206
scaling_rule = {
207207
metric = "CpuPercentage"
208208

209-
capacity_max = "3"
209+
capacity_max = "3"
210210
inc_scale_value = 3
211211

212212
dec_scale_type = "ChangeCount"
@@ -1002,10 +1002,10 @@ function_apps = {
10021002
}
10031003

10041004
RetrievePDSDemographic = {
1005-
name_suffix = "retrieve-pds-demographic"
1006-
function_endpoint_name = "RetrievePDSDemographic"
1007-
app_service_plan_key = "NonScaling"
1008-
key_vault_url = "KeyVaultConnectionString"
1005+
name_suffix = "retrieve-pds-demographic"
1006+
function_endpoint_name = "RetrievePDSDemographic"
1007+
app_service_plan_key = "NonScaling"
1008+
key_vault_url = "KeyVaultConnectionString"
10091009
app_urls = [
10101010
{
10111011
env_var_name = "ExceptionFunctionURL"
@@ -1021,13 +1021,13 @@ function_apps = {
10211021
}
10221022
]
10231023
env_vars_static = {
1024-
RetrievePdsParticipantURL = ""
1025-
Kid = ""
1026-
Audience = ""
1027-
AuthTokenURL = ""
1028-
KeyNamePrivateKey = ""
1024+
RetrievePdsParticipantURL = ""
1025+
Kid = ""
1026+
Audience = ""
1027+
AuthTokenURL = ""
1028+
KeyNamePrivateKey = ""
10291029
ParticipantManagementTopic = "participant-management"
1030-
UseFakePDSServices = "false"
1030+
UseFakePDSServices = "false"
10311031
}
10321032
}
10331033

0 commit comments

Comments
 (0)