63 lines
1.8 KiB
YAML

name: E2E cleanup over timeframe
description: Clean up old terraform resources of E2E tests
inputs:
ghToken:
description: 'The github token that is used with the github CLI.'
required: true
encryptionSecret:
description: 'The secret to use for decrypting the artifacts.'
required: true
azure_credentials:
description: "Credentials authorized to create Constellation on Azure."
required: true
openStackCloudsYaml:
description: "The contents of ~/.config/openstack/clouds.yaml"
required: false
stackitUat:
description: "The UAT for STACKIT"
required: false
runs:
using: "composite"
steps:
- name: Authenticate AWS
uses: aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
with:
role-to-assume: arn:aws:iam::795746500882:role/GithubActionsE2EDestroy
aws-region: eu-central-1
- name: Authenticate Azure
uses: ./.github/actions/login_azure
with:
azure_credentials: ${{ inputs.azure_credentials }}
- name: Authenticate GCP
uses: ./.github/actions/login_gcp
with:
service_account: "destroy-e2e@constellation-e2e.iam.gserviceaccount.com"
- name: Login to OpenStack
uses: ./.github/actions/login_openstack
with:
clouds_yaml: ${{ inputs.openStackCloudsYaml }}
- name: Login to STACKIT
uses: ./.github/actions/login_stackit
with:
serviceAccountToken: ${{ inputs.stackitUat }}
- name: Install tools
uses: ./.github/actions/setup_bazel_nix
with:
nixTools: |
_7zz
terraform
- name: Run cleanup
run: ./.github/actions/e2e_cleanup_timeframe/e2e-cleanup.sh
shell: bash
env:
GH_TOKEN: ${{ inputs.ghToken }}
ENCRYPTION_SECRET: ${{ inputs.encryptionSecret }}