Skip to content

Commit

Permalink
Merge pull request #4419 from DFE-Digital/fix_ci_destroy_permissions
Browse files Browse the repository at this point in the history
Fix CI destroy permission for review app
  • Loading branch information
vipin-dfe authored Dec 10, 2024
2 parents 643ead1 + 75eb93b commit 4cb5091
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:

- uses: google-github-actions/auth@v2
with:
# project_id: get-into-teaching
project_id: get-into-teaching
workload_identity_provider: projects/574582782335/locations/global/workloadIdentityPools/get-into-teaching-app/providers/get-into-teaching-app

- name: Get Short SHA
Expand Down Expand Up @@ -116,8 +116,8 @@ runs:
APP_LABEL="get-into-teaching-app-${{inputs.environment}}"
HOST="getintoteaching.education.gov.uk"
fi
az aks get-credentials --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --overwrite-existing
kubelogin convert-kubeconfig -l spn
POD_NAME=$(kubectl get pods -n ${{ env.NAMESPACE }} -l app=${APP_LABEL} -o jsonpath="{.items[0].metadata.name}")
kubectl exec -n ${{ env.NAMESPACE }} $POD_NAME -- bundle exec rails runner "TrackPageModificationsJob.perform_later(host: '${HOST}')"
kubectl exec -n ${{ env.NAMESPACE }} $POD_NAME -- bundle exec rails runner "TrackPageModificationsJob.perform_later(host: '${HOST}')"
5 changes: 5 additions & 0 deletions .github/workflows/destroy_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- uses: google-github-actions/auth@v2
with:
project_id: get-into-teaching
workload_identity_provider: projects/574582782335/locations/global/workloadIdentityPools/get-into-teaching-app/providers/get-into-teaching-app

- name: Setup Environment Variables
id: variables
run: |
Expand Down

0 comments on commit 4cb5091

Please sign in to comment.