mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-25 23:06:08 -05:00
ci: fix workspace related errors when setting up k8s version for test (#2891)
* Fail workflow on error in subshell * Remove relative paths from workflow * Set up MMA only for SEV-SNP, not for Azure TDX --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
18acd0b12a
commit
f21252c57d
25
.github/workflows/e2e-test-provider-example.yml
vendored
25
.github/workflows/e2e-test-provider-example.yml
vendored
@ -143,8 +143,8 @@ jobs:
|
|||||||
id: build
|
id: build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir -p ${{ github.workspace }}/build
|
||||||
cd build
|
cd ${{ github.workspace }}/build
|
||||||
bazel run //:devbuild --cli_edition=enterprise
|
bazel run //:devbuild --cli_edition=enterprise
|
||||||
|
|
||||||
bazel build //bazel/settings:tag
|
bazel build //bazel/settings:tag
|
||||||
@ -189,19 +189,22 @@ jobs:
|
|||||||
- name: Set Kubernetes version
|
- name: Set Kubernetes version
|
||||||
id: kubernetes
|
id: kubernetes
|
||||||
run: |
|
run: |
|
||||||
|
set -e
|
||||||
|
|
||||||
# take the middle (2nd) supported Kubernetes version (default)
|
# take the middle (2nd) supported Kubernetes version (default)
|
||||||
if [[ "${{ inputs.providerVersion }}" != "" ]]; then
|
if [[ "${{ inputs.providerVersion }}" != "" ]]; then
|
||||||
echo "VERSION=$(../release/constellation config kubernetes-versions | awk 'NR==3{print $1}')" | tee -a "$GITHUB_OUTPUT"
|
cli_output=$(${{ github.workspace }}/release/constellation config kubernetes-versions)
|
||||||
else
|
else
|
||||||
echo "VERSION=$(../build/constellation config kubernetes-versions | awk 'NR==3{print $1}')" | tee -a "$GITHUB_OUTPUT"
|
cli_output=$(${{ github.workspace }}/build/constellation config kubernetes-versions)
|
||||||
fi
|
fi
|
||||||
|
echo "version=$(echo "${cli_output}" | awk 'NR==3{print $1}')" | tee -a "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
- name: Common CSP Terraform overrides
|
- name: Common CSP Terraform overrides
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir cluster
|
mkdir -p ${{ github.workspace }}/cluster
|
||||||
cd cluster
|
cd ${{ github.workspace }}/cluster
|
||||||
if [[ "${{ inputs.providerVersion }}" == "" ]]; then
|
if [[ "${{ inputs.providerVersion }}" == "" ]]; then
|
||||||
prefixed_version=${{ steps.build.outputs.build_version }}
|
prefixed_version=${{ steps.build.outputs.build_version }}
|
||||||
else
|
else
|
||||||
@ -210,8 +213,8 @@ jobs:
|
|||||||
version=${prefixed_version#v} # remove v prefix
|
version=${prefixed_version#v} # remove v prefix
|
||||||
|
|
||||||
if [[ "${{ inputs.providerVersion }}" == "" ]]; then
|
if [[ "${{ inputs.providerVersion }}" == "" ]]; then
|
||||||
iam_src="../terraform-module/iam/${{ steps.determine.outputs.cloudProvider }}"
|
iam_src="${{ github.workspace }}/terraform-module/iam/${{ steps.determine.outputs.cloudProvider }}"
|
||||||
infra_src="../terraform-module/${{ steps.determine.outputs.cloudProvider }}"
|
infra_src="${{ github.workspace }}/terraform-module/${{ steps.determine.outputs.cloudProvider }}"
|
||||||
else
|
else
|
||||||
iam_src="https://github.com/edgelesssys/constellation/releases/download/${{ inputs.providerVersion }}/terraform-module.zip//terraform-module/iam/${{ steps.determine.outputs.cloudProvider }}"
|
iam_src="https://github.com/edgelesssys/constellation/releases/download/${{ inputs.providerVersion }}/terraform-module.zip//terraform-module/iam/${{ steps.determine.outputs.cloudProvider }}"
|
||||||
infra_src="https://github.com/edgelesssys/constellation/releases/download/${{ inputs.providerVersion }}/terraform-module.zip//terraform-module/${{ steps.determine.outputs.cloudProvider }}"
|
infra_src="https://github.com/edgelesssys/constellation/releases/download/${{ inputs.providerVersion }}/terraform-module.zip//terraform-module/${{ steps.determine.outputs.cloudProvider }}"
|
||||||
@ -310,10 +313,10 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
terraform init
|
terraform init
|
||||||
if [[ "${{ steps.determine.outputs.cloudProvider }}" == "azure" ]]; then
|
if [[ "${{ inputs.attestationVariant }}" == "azure-sev-snp" ]]; then
|
||||||
terraform apply -target module.azure_iam -auto-approve
|
terraform apply -target module.azure_iam -auto-approve
|
||||||
terraform apply -target module.azure_infrastructure -auto-approve
|
terraform apply -target module.azure_infrastructure -auto-approve
|
||||||
../build/constellation maa-patch "$(terraform output -raw maa_url)"
|
${{ github.workspace }}/build/constellation maa-patch "$(terraform output -raw maa_url)"
|
||||||
terraform apply -target constellation_cluster.azure_example -auto-approve
|
terraform apply -target constellation_cluster.azure_example -auto-approve
|
||||||
else
|
else
|
||||||
terraform apply -auto-approve
|
terraform apply -auto-approve
|
||||||
@ -405,7 +408,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# cfg must be in same dir as KUBECONFIG
|
# cfg must be in same dir as KUBECONFIG
|
||||||
../build/constellation config generate "${{ steps.determine.outputs.cloudProvider }}"
|
${{ github.workspace }}/build/constellation config generate "${{ steps.determine.outputs.cloudProvider }}"
|
||||||
# make cfg valid with fake data
|
# make cfg valid with fake data
|
||||||
# IMPORTANT: zone needs to be correct because it is used to resolve the CSP image ref
|
# IMPORTANT: zone needs to be correct because it is used to resolve the CSP image ref
|
||||||
if [[ "${{ steps.determine.outputs.cloudProvider }}" == "azure" ]]; then
|
if [[ "${{ steps.determine.outputs.cloudProvider }}" == "azure" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user