diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 69020bee7..9a0d99263 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -304,15 +304,19 @@ jobs: 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() @@ -320,7 +324,6 @@ 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