File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed
.azuredevops/templates/steps Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 22
33parameters :
44 - name : tfCommandOptions
5- type : string
65 default : ' '
7- - name : imageHash
8- type : string
9- default : ' '
10- - name : registryHost
11- type : string
126
137steps :
148 - template : tf_init.yaml
3226 commandOptions : >
3327 -input=false
3428 -var-file=$(tfVarsFile)
35- -var="image_commit_hash=${{ parameters. imageHash }} "
36- -var="registry_host=${{ parameters. registryHost }} "
29+ -var="image_commit_hash=$( imageHash) "
30+ -var="registry_host=$( registryHost) "
3731 ${{ parameters.tfCommandOptions }}
3832 -out=$(Build.ArtifactStagingDirectory)/$(ENVIRONMENT).tfplan
3933 environmentServiceNameAzureRM : $(SERVICE_CONNECTION)
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ jobs:
235235 env :
236236 container_registry : ${{ env.REGISTRY_HOST }}
237237 docker_services : >-
238- ${{ join(fromJSON(needs.containers-to-build.outputs.docker_services || '[]'), ',') }}
238+ ${{ needs.containers-to-build.outputs.docker_services && join(fromJSON(needs.containers-to-build.outputs.docker_services || '[]'), ',') }}
239239 run : |
240240 echo Running 'docker buildx imagetools' on remote repositories...
241241
@@ -261,15 +261,15 @@ jobs:
261261
262262 - name : Call deployment pipeline
263263 if : success()
264+ env :
265+ container_registry : ${{ env.REGISTRY_HOST }}
264266 run : |
265267 az pipelines run \
266268 --branch "main" \
267269 --name cd-infrastructure-dev-core \
268270 --org https://dev.azure.com/nhse-dtos \
269271 --project ${project_name} \
270- --parameters \
271- imageHash="${short_commit_hash}" \
272- registryHost="${REGISTRY_HOST}"
272+ --parameters "imageHash=${short_commit_hash}" "registryHost=${container_registry,,}"
273273
274274 aggregate-reports :
275275 name : Aggregate reports
You can’t perform that action at this time.
0 commit comments