mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-20 23:36:29 -04:00
windows integration + work with update_tfstate
This commit is contained in:
parent
eaba60d182
commit
774fb3f060
7
.github/actions/update_tfstate/action.yml
vendored
7
.github/actions/update_tfstate/action.yml
vendored
@ -11,12 +11,15 @@ inputs:
|
||||
encryptionSecret:
|
||||
description: "The encryption secret for the artifacts."
|
||||
required: true
|
||||
skipDeletion:
|
||||
description: "Don't try to delete the artifact before updating. You should only use this if you know that no artifact exists."
|
||||
default: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Check if tfstate should be deleted
|
||||
if: always()
|
||||
if: always() && !${{ inputs.skipDeletion }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [ ! -d constellation-terraform ] && [ ! -d constellation-iam-terraform ]; then
|
||||
@ -26,7 +29,7 @@ runs:
|
||||
fi
|
||||
|
||||
- name: Delete tfstate artifact if necessary
|
||||
if: always() && env.DELETE_TF_STATE == 'true'
|
||||
if: always() && env.DELETE_TF_STATE == 'true' && !${{ inputs.skipDeletion }}
|
||||
uses: ./.github/actions/artifact_delete
|
||||
with:
|
||||
name: ${{ inputs.name }}
|
||||
|
23
.github/workflows/e2e-windows.yml
vendored
23
.github/workflows/e2e-windows.yml
vendored
@ -195,3 +195,26 @@ jobs:
|
||||
test: Windows E2E Test
|
||||
provider: Azure
|
||||
attestationVariant: "azure-sev-snp"
|
||||
|
||||
upload-tfstate:
|
||||
name: Upload terraform state if it exists
|
||||
runs-on: ubuntu-22.04
|
||||
needs: e2e-test
|
||||
if: always()
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
with:
|
||||
ref: ${{ !github.event.pull_request.head.repo.fork && github.head_ref || '' }}
|
||||
|
||||
- name: Upload tfstate
|
||||
if: always()
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
uses: ./.github/actions/update_tfstate
|
||||
with:
|
||||
name: terraform-state-${{ github.run_id }}
|
||||
runID: ${{ github.run_id }}
|
||||
encryptionSecret: ${{ secrets.ARTIFACT_ENCRYPT_PASSWD }}
|
||||
skipDeletion: true
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user