From f1de3cf1645c89a9ea172da1b9f76a95873979e5 Mon Sep 17 00:00:00 2001 From: miampf Date: Wed, 20 Mar 2024 16:14:01 +0100 Subject: [PATCH] manual tfstate update -""- for release e2e test -""- for daily e2e test --- .github/workflows/e2e-test-daily.yml | 26 ++++++++++++++++++++++++++ .github/workflows/e2e-test-release.yml | 26 ++++++++++++++++++++++++++ .github/workflows/e2e-test-weekly.yml | 26 ++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) diff --git a/.github/workflows/e2e-test-daily.yml b/.github/workflows/e2e-test-daily.yml index 05072a099..a5576cef9 100644 --- a/.github/workflows/e2e-test-daily.yml +++ b/.github/workflows/e2e-test-daily.yml @@ -122,6 +122,32 @@ jobs: azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" + - name: Prepare terraform state folders + if: always() + shell: bash + run: | + rm -rf to-zip/* + 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 + fi + if [ -d constellation-iam-terraform ]; then + cp -r constellation-iam-terraform to-zip + rm -rf to-zip/constellation-iam-terraform/.terraform + fi + + - name: Update tfstate + if: always() + uses: ./.github/actions/artifact_upload + with: + name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }} + path: > + to-zip/constellation-terraform + to-zip/constellation-iam-terraform + encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }} + overwrite: true + - name: Notify about failure if: | failure() && diff --git a/.github/workflows/e2e-test-release.yml b/.github/workflows/e2e-test-release.yml index 4843d2cb7..177854239 100644 --- a/.github/workflows/e2e-test-release.yml +++ b/.github/workflows/e2e-test-release.yml @@ -378,6 +378,32 @@ jobs: azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" + - name: Prepare terraform state folders + if: always() + shell: bash + run: | + rm -rf to-zip/* + 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 + fi + if [ -d constellation-iam-terraform ]; then + cp -r constellation-iam-terraform to-zip + rm -rf to-zip/constellation-iam-terraform/.terraform + fi + + - name: Update tfstate + if: always() + uses: ./.github/actions/artifact_upload + with: + name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }} + path: > + to-zip/constellation-terraform + to-zip/constellation-iam-terraform + encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }} + overwrite: true + e2e-upgrade: strategy: fail-fast: false diff --git a/.github/workflows/e2e-test-weekly.yml b/.github/workflows/e2e-test-weekly.yml index 142ef8529..af5da0572 100644 --- a/.github/workflows/e2e-test-weekly.yml +++ b/.github/workflows/e2e-test-weekly.yml @@ -378,6 +378,32 @@ jobs: azureCredentials: ${{ secrets.AZURE_E2E_IAM_CREDENTIALS }} gcpServiceAccount: "iam-e2e@constellation-e2e.iam.gserviceaccount.com" + - name: Prepare terraform state folders + if: always() + shell: bash + run: | + rm -rf to-zip/* + 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 + fi + if [ -d constellation-iam-terraform ]; then + cp -r constellation-iam-terraform to-zip + rm -rf to-zip/constellation-iam-terraform/.terraform + fi + + - name: Update tfstate + if: always() + uses: ./.github/actions/artifact_upload + with: + name: terraform-state-${{ steps.e2e_test.outputs.namePrefix }} + path: > + to-zip/constellation-terraform + to-zip/constellation-iam-terraform + encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }} + overwrite: true + - name: Notify about failure if: | failure() &&