Skip to content

Commit

Permalink
Integrate GCP janitor to the e2e (#750)
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <danil.grigorev@suse.com>
  • Loading branch information
Danil-Grigorev committed Sep 23, 2024
1 parent 0070e17 commit 8a64dbd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/run-e2e-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ on:
required: false
default: false
type: boolean
run_gcp_janitor:
description: "Run the GCP janitor after the test to cleanup"
required: false
default: true
type: boolean

permissions:
contents: read
Expand Down Expand Up @@ -104,6 +109,16 @@ jobs:
client-secret: ${{ secrets.AZURE_CLIENT_SECRET}}
tenant-id: ${{ secrets.AZURE_TENANT_ID}}
commit: true
- name: Cleanup GCP Resources
if: ${{ inputs.run_gcp_janitor && always() }}
uses: rancher-sandbox/gcp-janitor@v0.1.0
with:
credentials-json: ${{ secrets.GCP_CREDENTIALS }}
zones: ${{ secrets.GCP_ZONE }}
project-id: ${{ secrets.GCP_PROJECT }}
age-in-hours: 6
resource-label-key: ${{ secrets.GCP_LABEL_KEY }}
resource-label-value: ${{ secrets.GCP_LABEL_VALUE }}
- name: Send failed status to slack
if: failure()
uses: slackapi/slack-github-action@v1.26.0
Expand Down

0 comments on commit 8a64dbd

Please sign in to comment.