Skip to content

Commit

Permalink
ci: tag resources created by e2e tests with the run name (#3035)
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf authored Apr 25, 2024
1 parent 591aba9 commit 3f7a4e4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/actions/constellation_iam_create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
namePrefix:
description: "Name prefix to use for resources."
required: true
additionalTags:
description: "Additional resource tags that will be written into the constellation configuration."
default: ""
required: false
#
# AWS specific inputs
#
Expand Down Expand Up @@ -49,7 +53,7 @@ runs:
fi
echo "flag=--update-config" | tee -a "$GITHUB_OUTPUT"
constellation config generate ${{ inputs.cloudProvider }} ${kubernetesFlag} --attestation ${{ inputs.attestationVariant }}
constellation config generate ${{ inputs.cloudProvider }} ${kubernetesFlag} --attestation ${{ inputs.attestationVariant }} --tags ${{ inputs.additionalTags }}
- name: Constellation iam create aws
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/actions/e2e_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ runs:
gcpProjectID: ${{ inputs.gcpProject }}
gcpZone: ${{ inputs.regionZone || 'europe-west3-b' }}
kubernetesVersion: ${{ inputs.kubernetesVersion }}
additionalTags: "workflow=${{ github.workflow }}"

- name: Login to GCP (Cluster service account)
if: inputs.cloudProvider == 'gcp'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
run: |
$uid = Get-Random -Minimum 1000 -Maximum 9999
$rgName = "e2e-win-${{ github.run_id }}-${{ github.run_attempt }}-$uid"
.\constellation.exe config generate azure
.\constellation.exe config generate azure -t "workflow=${{ github.workflow }}"
.\constellation.exe iam create azure --region=westus --resourceGroup=$rgName-rg --servicePrincipal=$rgName-sp --update-config --debug -y
- name: Login to Azure (Cluster service principal)
Expand Down

0 comments on commit 3f7a4e4

Please sign in to comment.