99 required : true
1010 HMCTS_ADO_PAT :
1111 required : true
12+ DEPLOYMENT_APP_ID :
13+ required : true
14+ description : " GitHub App ID for deployment"
15+ DEPLOYMENT_APP_PRIVATE_KEY :
16+ required : true
17+ description : " GitHub App private key for deployment"
1218 inputs :
1319 environment :
1420 required : true
2733 trigger_deploy :
2834 required : true
2935 type : boolean
36+ deploy_environment :
37+ required : false
38+ type : string
39+ default : dev
3040
3141jobs :
3242 Artefact-Version :
@@ -160,12 +170,15 @@ jobs:
160170 needs : [ Build, Artefact-Version ]
161171 if : ${{ inputs.trigger_deploy }}
162172 runs-on : ubuntu-latest
173+ outputs :
174+ run_id : ${{ steps.trigger.outputs.run_id }}
163175 steps :
164176 - name : Extract repo name
165177 run : echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
166178
167- - name : Trigger ADO pipeline
168- uses : hmcts/trigger-ado-pipeline@v1
179+ - name : Trigger ADO pipeline 460
180+ id : trigger
181+ uses : hmcts/trigger-ado-pipeline@v2
169182 with :
170183 pipeline_id : 460
171184 ado_pat : ${{ secrets.HMCTS_ADO_PAT }}
@@ -178,3 +191,50 @@ jobs:
178191 "agentDemand": "ubuntu-j25",
179192 "baseImage": "hmcts/apm-services:25-jre"
180193 }
194+
195+ Wait-For-ACR-Push :
196+ needs : [Deploy]
197+ if : ${{ inputs.trigger_deploy }}
198+ runs-on : ubuntu-latest
199+ steps :
200+ - name : Wait for ADO pipeline 460
201+ uses : hmcts/monitor-ado-pipeline@v1
202+ with :
203+ pipeline_id : 460
204+ run_id : ${{ needs.Deploy.outputs.run_id }}
205+ ado_pat : ${{ secrets.HMCTS_ADO_PAT }}
206+ poll_interval : 30
207+ timeout : 1800
208+
209+ deploy-dev :
210+ needs : [Wait-For-ACR-Push, Artefact-Version, Build]
211+ if : ${{ inputs.trigger_deploy }}
212+ runs-on : ubuntu-latest
213+ steps :
214+ - name : Generate date suffix
215+ id : date
216+ shell : bash
217+ run : echo "suffix=_$(date -u +'%d%m%y')" >> "$GITHUB_OUTPUT"
218+
219+ - name : Deploy via ADO pipeline
220+ uses : hmcts/action-ado-deploy@v1
221+ with :
222+ service_name : ${{ needs.Build.outputs.repo_name }}
223+ image_tag : ${{ needs.Artefact-Version.outputs.artefact_version }}
224+ tag_suffix : ${{ steps.date.outputs.suffix }}
225+ app_id : ${{ secrets.DEPLOYMENT_APP_ID }}
226+ app_private_key : ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}
227+ target_repository : hmcts/cp-vp-aks-deploy
228+ target_branch : env/dev
229+ values_file : vp-config/services_values.yml
230+ pipeline_id : 434
231+ ado_pat : ${{ secrets.HMCTS_ADO_PAT }}
232+ ref_name : refs/heads/env/dev
233+ wait : false
234+ template_parameters : >
235+ {
236+ "env": "dev",
237+ "cpbackendenv": "steccm64",
238+ "stack": "devamp01",
239+ "cluster": "K8-DEV-CS01-CL02"
240+ }
0 commit comments