Skip to content

Commit

Permalink
Merge pull request #2937 from statisticsnorway/MIM-2005-Nais-delete-y…
Browse files Browse the repository at this point in the history
…aml-alterations

[MIM-2005] delete_nais.yaml updates
  • Loading branch information
Carl-OW authored Oct 9, 2024
2 parents 46a5fb8 + 954ac3c commit 3c835c9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/delete_nais.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: NAIS Deploy
on:
pull_request:
types: [closed]

jobs:
delete:
name: 'Delete app from cluster'
permissions:
contents: "read"
id-token: "write"
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
if: (startsWith(github.head_ref, 'MIM-') || startsWith(github.head_ref, 'mim-') && contains(github.event.issue.labels.*.name, 'nais') && contains(fromJSON('["annesiri", "ssb-cgn", "Glenruben", "johnnadeluy", "Carl-OW", "michaelpande"]'), github.actor))
steps:
# turn 'MIM-9876_new_feature' into 'mim-9876' so it can be used in URL, it can be found in env.ISSUE_NUMBER
- name: "Get JIRA issue number"
- name: 'Get JIRA issue number'
id: jira_issue_number
run: |
BRANCH="${{ github.head_ref }}"
Expand All @@ -23,17 +23,17 @@ jobs:
echo "ISSUE_NUMBER=${ISSUE_NUMBER}" >> $GITHUB_ENV;
echo "Issue number: $ISSUE_NUMBER";
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v0.6.0"
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v2.1.6'
with:
workload_identity_provider: "projects/906675412832/locations/global/workloadIdentityPools/ssb-identity-pool/providers/github-oidc-provider"
service_account: "gh-ssb@nais-management-b3a7.iam.gserviceaccount.com"
token_format: "access_token"
- id: "get-credentials"
workload_identity_provider: 'projects/906675412832/locations/global/workloadIdentityPools/ssb-identity-pool/providers/github-oidc-provider'
service_account: 'gh-ssbno@nais-management-b3a7.iam.gserviceaccount.com'
token_format: 'access_token'
- id: 'get-credentials'
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: 'nais-test'
location: 'europe-north1'
- id: "delete"
run: "kubectl delete pod -n ssbno --selector=app=mimir-branch-${{ env.ISSUE_NUMBER }} --ignore-not-found=true"
- id: 'delete'
run: 'kubectl delete pod -n ssbno --selector=app=mimir-branch-${{ env.ISSUE_NUMBER }} --ignore-not-found=true'

0 comments on commit 3c835c9

Please sign in to comment.