post PR message on init or validate failure (#1135)
This commit is contained in:
committed by
GitHub
parent
9b8de3e415
commit
2471e25c2c
@@ -92,11 +92,13 @@ jobs:
|
|||||||
# run Terraform init/validate/plan
|
# run Terraform init/validate/plan
|
||||||
- id: tf-init
|
- id: tf-init
|
||||||
name: Terraform init
|
name: Terraform init
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
terraform init -no-color
|
terraform init -no-color
|
||||||
|
|
||||||
- id: tf-validate
|
- id: tf-validate
|
||||||
name: Terraform validate
|
name: Terraform validate
|
||||||
|
continue-on-error: true
|
||||||
run: terraform validate -no-color
|
run: terraform validate -no-color
|
||||||
|
|
||||||
- id: tf-plan
|
- id: tf-plan
|
||||||
@@ -179,6 +181,16 @@ jobs:
|
|||||||
body: output
|
body: output
|
||||||
})
|
})
|
||||||
|
|
||||||
|
- id: check-init
|
||||||
|
name: Check init failure
|
||||||
|
if: steps.tf-init.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
|
- id: check-validate
|
||||||
|
name: Check validate failure
|
||||||
|
if: steps.tf-validate.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
- id: check-plan
|
- id: check-plan
|
||||||
name: Check plan failure
|
name: Check plan failure
|
||||||
if: steps.tf-plan.outcome != 'success'
|
if: steps.tf-plan.outcome != 'success'
|
||||||
|
|||||||
@@ -88,11 +88,13 @@ jobs:
|
|||||||
# run Terraform init/validate/plan
|
# run Terraform init/validate/plan
|
||||||
- id: tf-init
|
- id: tf-init
|
||||||
name: Terraform init
|
name: Terraform init
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
terraform init -no-color
|
terraform init -no-color
|
||||||
|
|
||||||
- id: tf-validate
|
- id: tf-validate
|
||||||
name: Terraform validate
|
name: Terraform validate
|
||||||
|
continue-on-error: true
|
||||||
run: terraform validate -no-color
|
run: terraform validate -no-color
|
||||||
|
|
||||||
- id: tf-plan
|
- id: tf-plan
|
||||||
@@ -175,6 +177,16 @@ jobs:
|
|||||||
body: output
|
body: output
|
||||||
})
|
})
|
||||||
|
|
||||||
|
- id: check-init
|
||||||
|
name: Check init failure
|
||||||
|
if: steps.tf-init.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
|
- id: check-validate
|
||||||
|
name: Check validate failure
|
||||||
|
if: steps.tf-validate.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
- id: check-plan
|
- id: check-plan
|
||||||
name: Check plan failure
|
name: Check plan failure
|
||||||
if: steps.tf-plan.outcome != 'success'
|
if: steps.tf-plan.outcome != 'success'
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ env:
|
|||||||
FAST_WIF_PROVIDER: ${identity_provider}
|
FAST_WIF_PROVIDER: ${identity_provider}
|
||||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||||
TF_PROVIDERS_FILE: ${tf_providers_file}
|
TF_PROVIDERS_FILE: ${tf_providers_file}
|
||||||
TF_VAR_FILES: ${tf_var_files == [] ? "''" : join("\n ", tf_var_files)}
|
%{~ if tf_var_files != [] ~}
|
||||||
|
TF_VAR_FILES: ${join("\n ", tf_var_files)}
|
||||||
|
%{~ endif ~}
|
||||||
TF_VERSION: 1.3.2
|
TF_VERSION: 1.3.2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -73,11 +75,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
gcloud alpha storage cp -r \
|
gcloud alpha storage cp -r \
|
||||||
"gs://$${{env.FAST_OUTPUTS_BUCKET}}/providers/$${{env.TF_PROVIDERS_FILE}}" ./
|
"gs://$${{env.FAST_OUTPUTS_BUCKET}}/providers/$${{env.TF_PROVIDERS_FILE}}" ./
|
||||||
|
%{~ if tf_var_files != [] ~}
|
||||||
gcloud alpha storage cp -r \
|
gcloud alpha storage cp -r \
|
||||||
"gs://$${{env.FAST_OUTPUTS_BUCKET}}/tfvars" ./
|
"gs://$${{env.FAST_OUTPUTS_BUCKET}}/tfvars" ./
|
||||||
for f in $${{env.TF_VAR_FILES}}; do
|
for f in $${{env.TF_VAR_FILES}}; do
|
||||||
ln -s "tfvars/$f" ./
|
ln -s "tfvars/$f" ./
|
||||||
done
|
done
|
||||||
|
%{~ endif ~}
|
||||||
|
|
||||||
- id: tf-setup
|
- id: tf-setup
|
||||||
name: Set up Terraform
|
name: Set up Terraform
|
||||||
@@ -88,10 +92,12 @@ jobs:
|
|||||||
# run Terraform init/validate/plan
|
# run Terraform init/validate/plan
|
||||||
- id: tf-init
|
- id: tf-init
|
||||||
name: Terraform init
|
name: Terraform init
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
terraform init -no-color
|
terraform init -no-color
|
||||||
|
|
||||||
- id: tf-validate
|
- id: tf-validate
|
||||||
|
continue-on-error: true
|
||||||
name: Terraform validate
|
name: Terraform validate
|
||||||
run: terraform validate -no-color
|
run: terraform validate -no-color
|
||||||
|
|
||||||
@@ -175,6 +181,16 @@ jobs:
|
|||||||
body: output
|
body: output
|
||||||
})
|
})
|
||||||
|
|
||||||
|
- id: check-init
|
||||||
|
name: Check init failure
|
||||||
|
if: steps.tf-init.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
|
- id: check-validate
|
||||||
|
name: Check validate failure
|
||||||
|
if: steps.tf-validate.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
- id: check-plan
|
- id: check-plan
|
||||||
name: Check plan failure
|
name: Check plan failure
|
||||||
if: steps.tf-plan.outcome != 'success'
|
if: steps.tf-plan.outcome != 'success'
|
||||||
|
|||||||
@@ -88,10 +88,12 @@ jobs:
|
|||||||
# run Terraform init/validate/plan
|
# run Terraform init/validate/plan
|
||||||
- id: tf-init
|
- id: tf-init
|
||||||
name: Terraform init
|
name: Terraform init
|
||||||
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
terraform init -no-color
|
terraform init -no-color
|
||||||
|
|
||||||
- id: tf-validate
|
- id: tf-validate
|
||||||
|
continue-on-error: true
|
||||||
name: Terraform validate
|
name: Terraform validate
|
||||||
run: terraform validate -no-color
|
run: terraform validate -no-color
|
||||||
|
|
||||||
@@ -175,6 +177,16 @@ jobs:
|
|||||||
body: output
|
body: output
|
||||||
})
|
})
|
||||||
|
|
||||||
|
- id: check-init
|
||||||
|
name: Check init failure
|
||||||
|
if: steps.tf-init.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
|
- id: check-validate
|
||||||
|
name: Check validate failure
|
||||||
|
if: steps.tf-validate.outcome != 'success'
|
||||||
|
run: exit 1
|
||||||
|
|
||||||
- id: check-plan
|
- id: check-plan
|
||||||
name: Check plan failure
|
name: Check plan failure
|
||||||
if: steps.tf-plan.outcome != 'success'
|
if: steps.tf-plan.outcome != 'success'
|
||||||
|
|||||||
Reference in New Issue
Block a user