mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
ci: ensure --tags
flag is only set if the CLI supports it (#3044)
* Use github.run_id to correctly tag resources with the run id * Ensure `--tags` flag is only set if CLI supports it --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
0df26c0e9b
commit
680d3318af
@ -52,8 +52,14 @@ runs:
|
||||
kubernetesFlag="--kubernetes=${{ inputs.kubernetesVersion }}"
|
||||
fi
|
||||
|
||||
# TODO(v2.17): Remove this fallback and always use --tags flag
|
||||
tagsFlag=""
|
||||
if constellation config generate --help | grep -q -- --tags; then
|
||||
tagsFlag="--tags=\"${{ inputs.additionalTags }}\""
|
||||
fi
|
||||
|
||||
echo "flag=--update-config" | tee -a "$GITHUB_OUTPUT"
|
||||
constellation config generate ${{ inputs.cloudProvider }} ${kubernetesFlag} --attestation ${{ inputs.attestationVariant }} --tags ${{ inputs.additionalTags }}
|
||||
constellation config generate ${{ inputs.cloudProvider }} ${kubernetesFlag} --attestation ${{ inputs.attestationVariant }} ${tagsFlag}
|
||||
|
||||
- name: Constellation iam create aws
|
||||
shell: bash
|
||||
|
2
.github/actions/e2e_test/action.yml
vendored
2
.github/actions/e2e_test/action.yml
vendored
@ -258,7 +258,7 @@ runs:
|
||||
gcpProjectID: ${{ inputs.gcpProject }}
|
||||
gcpZone: ${{ inputs.regionZone || 'europe-west3-b' }}
|
||||
kubernetesVersion: ${{ inputs.kubernetesVersion }}
|
||||
additionalTags: "workflow=${{ github.workflow }}"
|
||||
additionalTags: "workflow=${{ github.run_id }}"
|
||||
|
||||
- name: Login to GCP (Cluster service account)
|
||||
if: inputs.cloudProvider == 'gcp'
|
||||
|
2
.github/workflows/e2e-windows.yml
vendored
2
.github/workflows/e2e-windows.yml
vendored
@ -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 -t "workflow=${{ github.workflow }}"
|
||||
.\constellation.exe config generate azure -t "workflow=${{ github.run_id }}"
|
||||
.\constellation.exe iam create azure --region=westus --resourceGroup=$rgName-rg --servicePrincipal=$rgName-sp --update-config --debug -y
|
||||
|
||||
- name: Login to Azure (Cluster service principal)
|
||||
|
Loading…
Reference in New Issue
Block a user