Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 45 additions & 2 deletions .github/workflows/ci-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ on:
required: true
HMCTS_ADO_PAT:
required: true
DEPLOYMENT_APP_ID:
required: true
description: "GitHub App ID for deployment"
DEPLOYMENT_APP_PRIVATE_KEY:
required: true
description: "GitHub App private key for deployment"
DEPLOYMENT_APP_INSTALLATION_ID:
required: true
description: "GitHub App installation ID for deployment"
inputs:
environment:
required: true
Expand All @@ -31,6 +40,10 @@ on:
required: false
type: boolean
default: false
deploy_environment:
required: false
type: string
default: dev


jobs:
Expand Down Expand Up @@ -296,12 +309,15 @@ jobs:
needs: [ Provider-Deploy, Build, Artefact-Version ]
if: ${{ inputs.trigger_deploy }}
runs-on: ubuntu-latest
outputs:
run_id: ${{ steps.trigger.outputs.run_id }}
steps:
- name: Extract repo name
run: echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Trigger ADO pipeline
uses: hmcts/trigger-ado-pipeline@v1
- name: Trigger ADO pipeline 460
id: trigger
uses: hmcts/trigger-ado-pipeline@v2
with:
pipeline_id: 460
ado_pat: ${{ secrets.HMCTS_ADO_PAT }}
Expand All @@ -315,3 +331,30 @@ jobs:
"baseImage": "hmcts/apm-services:25-jre"
}

Wait-For-ACR-Push:
needs: [Deploy]
if: ${{ inputs.trigger_deploy }}
runs-on: ubuntu-latest
steps:
- name: Wait for ADO pipeline 460
uses: hmcts/monitor-ado-pipeline@v1
with:
pipeline_id: 460
run_id: ${{ needs.Deploy.outputs.run_id }}
ado_pat: ${{ secrets.HMCTS_ADO_PAT }}
poll_interval: 30
timeout: 1800

Deploy-To-K8s:
needs: [Wait-For-ACR-Push, Artefact-Version, Build]
if: ${{ inputs.trigger_deploy }}
uses: hmcts/cp-vp-aks-deploy/.github/workflows/update-service-tag.yml@main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this entry looks odd for the path

with:
service_name: ${{ needs.Build.outputs.repo_name }}
image_tag: ${{ needs.Artefact-Version.outputs.artefact_version }}
environment: ${{ inputs.deploy_environment }}
secrets:
app_id: ${{ secrets.DEPLOYMENT_APP_ID }}
app_private_key: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}
app_installation_id: ${{ secrets.DEPLOYMENT_APP_INSTALLATION_ID }}

4 changes: 4 additions & 0 deletions .github/workflows/ci-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ jobs:
AZURE_DEVOPS_ARTIFACT_USERNAME: ${{ secrets.AZURE_DEVOPS_ARTIFACT_USERNAME }}
AZURE_DEVOPS_ARTIFACT_TOKEN: ${{ secrets.AZURE_DEVOPS_ARTIFACT_TOKEN }}
HMCTS_ADO_PAT: ${{ secrets.HMCTS_CP_ADO_PAT }}
DEPLOYMENT_APP_ID: ${{ secrets.DEPLOYMENT_APP_ID }}
DEPLOYMENT_APP_PRIVATE_KEY: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}
DEPLOYMENT_APP_INSTALLATION_ID: ${{ secrets.DEPLOYMENT_APP_INSTALLATION_ID }}
with:
environment: dev
is_publish: ${{ github.event_name == 'push' }}
trigger_docker: ${{ github.event_name == 'push' }}
trigger_deploy: ${{ github.event_name == 'push' }}
run_api_test: ${{ github.event_name == 'pull_request' }}
deploy_environment: dev
4 changes: 4 additions & 0 deletions .github/workflows/ci-released.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ jobs:
AZURE_DEVOPS_ARTIFACT_USERNAME: ${{ secrets.AZURE_DEVOPS_ARTIFACT_USERNAME }}
AZURE_DEVOPS_ARTIFACT_TOKEN: ${{ secrets.AZURE_DEVOPS_ARTIFACT_TOKEN }}
HMCTS_ADO_PAT: ${{ secrets.HMCTS_CP_ADO_PAT }}
DEPLOYMENT_APP_ID: ${{ secrets.DEPLOYMENT_APP_ID }}
DEPLOYMENT_APP_PRIVATE_KEY: ${{ secrets.DEPLOYMENT_APP_PRIVATE_KEY }}
DEPLOYMENT_APP_INSTALLATION_ID: ${{ secrets.DEPLOYMENT_APP_INSTALLATION_ID }}
with:
environment: dev
is_release: true
is_publish: true
trigger_docker: true
trigger_deploy: true
deploy_environment: dev
Loading