mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 23:36:29 -04:00
added new logic to other tests
added manual logic to e2e-upgrade.yml
This commit is contained in:
parent
488f12b973
commit
23814c53b8
27
.github/workflows/e2e-test-daily.yml
vendored
27
.github/workflows/e2e-test-daily.yml
vendored
@ -56,6 +56,7 @@ jobs:
|
||||
checks: write
|
||||
contents: read
|
||||
packages: write
|
||||
actions: write
|
||||
needs: [find-latest-image]
|
||||
steps:
|
||||
- name: Check out repository
|
||||
@ -122,20 +123,43 @@ jobs:
|
||||
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
|
||||
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
|
||||
|
||||
- name: Check if tfstate should be deleted
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform ]; then
|
||||
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Delete tfstate artifact if necessary
|
||||
if: env.DELETE_TF_STATE == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
uses: ./.github/actions/artifact_delete
|
||||
with:
|
||||
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
|
||||
workflowID: ${{ github.run_id }}
|
||||
|
||||
- name: Prepare terraform state folders
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf to-zip/*
|
||||
to_upload=""
|
||||
if [ -d constellation-terraform ]; then
|
||||
cp -r constellation-terraform to-zip
|
||||
rm to-zip/constellation-terraform/plan.zip
|
||||
rm -rf to-zip/constellation-terraform/.terraform
|
||||
to_upload+="to-zip/constellation-terraform"
|
||||
fi
|
||||
if [ -d constellation-iam-terraform ]; then
|
||||
cp -r constellation-iam-terraform to-zip
|
||||
rm -rf to-zip/constellation-iam-terraform/.terraform
|
||||
to_upload+=" to-zip/constellation-iam-terraform"
|
||||
fi
|
||||
echo "TO_UPLOAD=$to_upload" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Update tfstate
|
||||
if: always()
|
||||
@ -143,8 +167,7 @@ jobs:
|
||||
with:
|
||||
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
|
||||
path: >
|
||||
to-zip/constellation-terraform
|
||||
to-zip/constellation-iam-terraform
|
||||
${{ env.TO_UPLOAD }}
|
||||
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
|
||||
overwrite: true
|
||||
|
||||
|
27
.github/workflows/e2e-test-release.yml
vendored
27
.github/workflows/e2e-test-release.yml
vendored
@ -303,6 +303,7 @@ jobs:
|
||||
checks: write
|
||||
contents: read
|
||||
packages: write
|
||||
actions: write
|
||||
steps:
|
||||
- name: Install the basics tools (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
@ -378,20 +379,43 @@ jobs:
|
||||
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
|
||||
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
|
||||
|
||||
- name: Check if tfstate should be deleted
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform ]; then
|
||||
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Delete tfstate artifact if necessary
|
||||
if: env.DELETE_TF_STATE == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
uses: ./.github/actions/artifact_delete
|
||||
with:
|
||||
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
|
||||
workflowID: ${{ github.run_id }}
|
||||
|
||||
- name: Prepare terraform state folders
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf to-zip/*
|
||||
to_upload=""
|
||||
if [ -d constellation-terraform ]; then
|
||||
cp -r constellation-terraform to-zip
|
||||
rm to-zip/constellation-terraform/plan.zip
|
||||
rm -rf to-zip/constellation-terraform/.terraform
|
||||
to_upload+="to-zip/constellation-terraform"
|
||||
fi
|
||||
if [ -d constellation-iam-terraform ]; then
|
||||
cp -r constellation-iam-terraform to-zip
|
||||
rm -rf to-zip/constellation-iam-terraform/.terraform
|
||||
to_upload+=" to-zip/constellation-iam-terraform"
|
||||
fi
|
||||
echo "TO_UPLOAD=$to_upload" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Update tfstate
|
||||
if: always()
|
||||
@ -399,8 +423,7 @@ jobs:
|
||||
with:
|
||||
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
|
||||
path: >
|
||||
to-zip/constellation-terraform
|
||||
to-zip/constellation-iam-terraform
|
||||
${{ env.TO_UPLOAD }}
|
||||
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
|
||||
overwrite: true
|
||||
|
||||
|
27
.github/workflows/e2e-test-weekly.yml
vendored
27
.github/workflows/e2e-test-weekly.yml
vendored
@ -309,6 +309,7 @@ jobs:
|
||||
checks: write
|
||||
contents: read
|
||||
packages: write
|
||||
actions: write
|
||||
needs: [find-latest-image]
|
||||
steps:
|
||||
- name: Check out repository
|
||||
@ -378,20 +379,43 @@ jobs:
|
||||
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
|
||||
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
|
||||
|
||||
- name: Check if tfstate should be deleted
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform ]; then
|
||||
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Delete tfstate artifact if necessary
|
||||
if: env.DELETE_TF_STATE == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
uses: ./.github/actions/artifact_delete
|
||||
with:
|
||||
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
|
||||
workflowID: ${{ github.run_id }}
|
||||
|
||||
- name: Prepare terraform state folders
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf to-zip/*
|
||||
to_upload=""
|
||||
if [ -d constellation-terraform ]; then
|
||||
cp -r constellation-terraform to-zip
|
||||
rm to-zip/constellation-terraform/plan.zip
|
||||
rm -rf to-zip/constellation-terraform/.terraform
|
||||
to_upload+="to-zip/constellation-terraform"
|
||||
fi
|
||||
if [ -d constellation-iam-terraform ]; then
|
||||
cp -r constellation-iam-terraform to-zip
|
||||
rm -rf to-zip/constellation-iam-terraform/.terraform
|
||||
to_upload+=" to-zip/constellation-iam-terraform"
|
||||
fi
|
||||
echo "TO_UPLOAD=$to_upload" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Update tfstate
|
||||
if: always()
|
||||
@ -399,8 +423,7 @@ jobs:
|
||||
with:
|
||||
name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }}
|
||||
path: >
|
||||
to-zip/constellation-terraform
|
||||
to-zip/constellation-iam-terraform
|
||||
${{ env.TO_UPLOAD }}
|
||||
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
|
||||
overwrite: true
|
||||
|
||||
|
69
.github/workflows/e2e-upgrade.yml
vendored
69
.github/workflows/e2e-upgrade.yml
vendored
@ -505,6 +505,27 @@ jobs:
|
||||
constellation-version.yaml
|
||||
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
|
||||
|
||||
- name: Prepare terraform state
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p to-zip
|
||||
cp -r constellation-terraform to-zip
|
||||
rm to-zip/constellation-terraform/plan.zip
|
||||
rm -rf to-zip/constellation-terraform/.terraform
|
||||
cp -r constellation-iam-terraform to-zip
|
||||
rm -rf to-zip/constellation-iam-terraform/.terraform
|
||||
|
||||
- name: Upload terraform state
|
||||
if: always()
|
||||
uses: ./.github/actions/artifact_upload
|
||||
with:
|
||||
name: terraform-state-${{ github.run_id }}
|
||||
path: >
|
||||
to-zip/constellation-terraform
|
||||
to-zip/constellation-iam-terraform
|
||||
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
|
||||
|
||||
- name: Always terminate cluster
|
||||
if: always()
|
||||
uses: ./.github/actions/constellation_destroy
|
||||
@ -523,6 +544,54 @@ jobs:
|
||||
azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }}
|
||||
gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com"
|
||||
|
||||
- name: Check if tfstate should be deleted
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform ]; then
|
||||
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
|
||||
else
|
||||
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
- name: Delete tfstate artifact if necessary
|
||||
if: env.DELETE_TF_STATE == 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
uses: ./.github/actions/artifact_delete
|
||||
with:
|
||||
name: terraform-state-${{ github.run_id }}
|
||||
workflowID: ${{ github.run_id }}
|
||||
|
||||
- name: Prepare terraform state folders
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf to-zip/*
|
||||
to_upload=""
|
||||
if [ -d constellation-terraform ]; then
|
||||
cp -r constellation-terraform to-zip
|
||||
rm to-zip/constellation-terraform/plan.zip
|
||||
rm -rf to-zip/constellation-terraform/.terraform
|
||||
to_upload+="to-zip/constellation-terraform"
|
||||
fi
|
||||
if [ -d constellation-iam-terraform ]; then
|
||||
cp -r constellation-iam-terraform to-zip
|
||||
rm -rf to-zip/constellation-iam-terraform/.terraform
|
||||
to_upload+=" to-zip/constellation-iam-terraform"
|
||||
fi
|
||||
echo "TO_UPLOAD=$to_upload" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Update tfstate
|
||||
if: always()
|
||||
uses: ./.github/actions/artifact_upload
|
||||
with:
|
||||
name: terraform-state-${{ github.run_id }}
|
||||
path: >
|
||||
${{ env.TO_UPLOAD }}
|
||||
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
|
||||
overwrite: true
|
||||
|
||||
- name: Notify about failure
|
||||
if: |
|
||||
always() &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user