mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-02-23 16:30:11 -05:00
ci: fix delete artifact conditional (#3067)
* Fix state exists check * Dont fail if folder to remove does not exist --------- Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
012937740f
commit
edc0c7068e
@ -262,7 +262,7 @@ runs:
|
|||||||
mkdir to-zip
|
mkdir to-zip
|
||||||
cp -r constellation-terraform to-zip
|
cp -r constellation-terraform to-zip
|
||||||
cp -r constellation-iam-terraform to-zip
|
cp -r constellation-iam-terraform to-zip
|
||||||
rm to-zip/constellation-terraform/plan.zip
|
rm -f to-zip/constellation-terraform/plan.zip
|
||||||
rm -rf to-zip/constellation-terraform/.terraform to-zip/constellation-iam-terraform/.terraform
|
rm -rf to-zip/constellation-terraform/.terraform to-zip/constellation-iam-terraform/.terraform
|
||||||
|
|
||||||
- name: Upload terraform state
|
- name: Upload terraform state
|
||||||
|
2
.github/actions/update_tfstate/action.yml
vendored
2
.github/actions/update_tfstate/action.yml
vendored
@ -23,7 +23,7 @@ runs:
|
|||||||
if: always() && inputs.skipDeletion == 'false'
|
if: always() && inputs.skipDeletion == 'false'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [[ ! -d constellation-terraform ]] && [[ ! -d constellation-iam-terraform ]]; then
|
if [[ -d constellation-terraform ]] || [[ -d constellation-iam-terraform ]]; then
|
||||||
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
|
echo "DELETE_TF_STATE=true" >> "$GITHUB_ENV"
|
||||||
else
|
else
|
||||||
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
|
echo "DELETE_TF_STATE=false" >> "$GITHUB_ENV"
|
||||||
|
@ -23,4 +23,4 @@ runs:
|
|||||||
- name: Cleanup Terraform module dir
|
- name: Cleanup Terraform module dir
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
rm -r terraform-module terraform-module.zip
|
rm -f terraform-module terraform-module.zip
|
||||||
|
2
.github/workflows/e2e-upgrade.yml
vendored
2
.github/workflows/e2e-upgrade.yml
vendored
@ -513,7 +513,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir -p to-zip
|
mkdir -p to-zip
|
||||||
cp -r constellation-terraform to-zip
|
cp -r constellation-terraform to-zip
|
||||||
rm to-zip/constellation-terraform/plan.zip
|
rm -f to-zip/constellation-terraform/plan.zip
|
||||||
rm -rf to-zip/constellation-terraform/.terraform
|
rm -rf to-zip/constellation-terraform/.terraform
|
||||||
cp -r constellation-iam-terraform to-zip
|
cp -r constellation-iam-terraform to-zip
|
||||||
rm -rf to-zip/constellation-iam-terraform/.terraform
|
rm -rf to-zip/constellation-iam-terraform/.terraform
|
||||||
|
Loading…
x
Reference in New Issue
Block a user