From 566373f9cb953fb973cc90fc09966dd9dd80df07 Mon Sep 17 00:00:00 2001 From: Marcus Aspin Date: Fri, 9 Aug 2024 09:36:49 +0100 Subject: [PATCH] PI-2302 Fix deployment following change to IP allow lists variable (#4154) --- .github/actions/cloud-platform-deploy/action.yml | 7 +++++-- .github/workflows/deploy.yml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/cloud-platform-deploy/action.yml b/.github/actions/cloud-platform-deploy/action.yml index 96164a73d9..a0dc2afca4 100644 --- a/.github/actions/cloud-platform-deploy/action.yml +++ b/.github/actions/cloud-platform-deploy/action.yml @@ -26,6 +26,9 @@ inputs: token: description: The KUBE_TOKEN required: true + ip-allowlists: + description: The HMPPS IP allow list groups to apply, in base64-encoded YAML format + required: true runs: using: composite @@ -79,7 +82,7 @@ runs: --set "generic-service.env.BUILD_INFO=$([ -r "$BUILD_INFO" ] && cat "$BUILD_INFO" | base64 -w0 || echo)" \ --set "generic-service.env.GIT_INFO=$([ -r "$GIT_INFO" ] && cat "$GIT_INFO" | base64 -w0 || echo)" \ --timeout 10m \ - --values <(echo "$HMPPS_IP_ALLOWLIST_GROUPS_YAML" | base64 -d) \ + --values <(echo "$IP_ALLOWLISTS" | base64 -d) \ --values templates/helm-defaults.yml \ --values 'projects/${{ inputs.project }}/deploy/values.yaml' \ --values 'projects/${{ inputs.project }}/deploy/${{ steps.env.outputs.values-file }}' \ @@ -95,5 +98,5 @@ runs: env: BUILD_INFO: projects/${{ inputs.project }}/build-info.properties GIT_INFO: projects/${{ inputs.project }}/git.properties - HMPPS_IP_ALLOWLIST_GROUPS_YAML: ${{ vars.HMPPS_IP_ALLOWLIST_GROUPS_YAML }} + IP_ALLOWLISTS: ${{ inputs.ip-allowlists }} MAX_ATTEMPTS: '3' \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1a0e74ec29..9ca512a3bf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -128,6 +128,7 @@ jobs: cluster: ${{ secrets.KUBE_CLUSTER }} namespace: ${{ secrets.KUBE_NAMESPACE }} token: ${{ secrets.KUBE_TOKEN }} + ip-allowlists: ${{ vars.HMPPS_IP_ALLOWLIST_GROUPS_YAML }} - uses: docker/login-action@v3 if: ${{ steps.check_files.outputs.files_exists == 'true' && steps.enabled.outputs.enabled == 'true' }}