This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ resources:
1414 - repository : dtos-devops-templates
1515 type : github
1616 name : NHSDigital/dtos-devops-templates
17- ref : main
17+ ref : feat/dtoss-9326-trigger-cd-pipeline-with-commit
1818 endpoint : NHSDigital
1919
2020parameters :
@@ -23,6 +23,7 @@ parameters:
2323 default : ' '
2424 - name : registryHost
2525 type : string
26+ default : ' '
2627
2728variables :
2829 - group : DEV_core_backend
@@ -49,10 +50,23 @@ stages:
4950 steps :
5051 - checkout : self
5152 - checkout : dtos-devops-templates
53+
54+ - script : |
55+ if [ -z "${{ parameters.registryHost }}" ]; then
56+ echo "Using fallback secret for registryHost ($ACR_NAME)"
57+ echo "##vso[task.setvariable variable=resolvedHost;issecret=true]$ACR_NAME"
58+ else
59+ echo "Using provided registryHost parameter"
60+ echo "##vso[task.setvariable variable=resolvedHost]${{ parameters.registryHost }}"
61+ fi
62+ displayName: Set resolved registryHost
63+ env:
64+ ACR_NAME: $(ACR_NAME)
65+
5266 - template : .azuredevops/templates/steps/tf_plan.yaml@dtos-devops-templates
5367 parameters :
5468 imageHash : ${{ parameters.imageHash }}
55- registryHost : ${{ parameters.registryHost }}
69+ registryHost : $(resolvedHost)
5670
5771 - stage : terraform_apply
5872 displayName : Terraform Apply
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ jobs:
103103 build-image-stage : # Recommended maximum execution time is 3 minutes
104104 name : Image build stage
105105 needs : [metadata, commit-stage, test-stage]
106- uses : NHSDigital/dtos-devops-templates/.github/workflows/stage-3-build.yaml@main
106+ uses : NHSDigital/dtos-devops-templates/.github/workflows/stage-3-build.yaml@feat/dtoss-9326-trigger-cd-pipeline-with-commit
107107 if : needs.metadata.outputs.does_pull_request_exist == 'true' || github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
108108 with :
109109 docker_compose_file_csv_list : ./compose.yaml
Original file line number Diff line number Diff line change 2727 . Build ( ) ;
2828
2929await host . RunAsync ( ) ;
30+
31+
32+
You can’t perform that action at this time.
0 commit comments