Skip to content

Commit 7914d18

Browse files
authored
Update env0.yml
1 parent 5130a06 commit 7914d18

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
version: 2
22
deploy:
33
steps:
4+
terraformPlan:
5+
after:
6+
- name: "Skip Test: Check Skip"
7+
run: |
8+
if [[ $(terraform show .tf-plan | grep -ic "no changes.") -gt 0 ]]; then echo TF_PLAN_EXIT_CODE=0 >> $ENV0_ENV; else echo TF_PLAN_EXIT_CODE=2 >> $ENV0_ENV; fi
49
terraformApply:
510
before:
6-
- name: "VMW Skip Test: Before Apply"
11+
- name: "Skip Test: Before Apply"
712
run: |
8-
echo "I'm running before the apply"
13+
echo "TF_PLAN_EXIT_CODE value is $TF_PLAN_EXIT_CODE"
14+
if [ "$TF_PLAN_EXIT_CODE" == "0" ]; then echo "No changes, not running pre-apply flow" ; else echo "I'm running before the apply"; fi
915
after:
10-
- name: "VMW Skip Test: After Apply"
16+
- name: "Skip Test: After Apply"
1117
run: |
12-
echo "I'm running after the apply"
18+
echo "TF_PLAN_EXIT_CODE value is $TF_PLAN_EXIT_CODE"
19+
if [ "$TF_PLAN_EXIT_CODE" == "0" ]; then echo "No changes, not running post-apply flow" ; else echo "I'm running after the apply"; fi

0 commit comments

Comments
 (0)