Skip to content

Commit

Permalink
opendatacube#190 Capture terraform validate test result
Browse files Browse the repository at this point in the history
  • Loading branch information
whatnick committed Feb 6, 2020
1 parent 7b7bfe9 commit 7d61c0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .circleci/run_tflint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ for a in $(ls examples/stage);
terraform init;
tflint --module main.tf;
mv main.tf.bck main.tf;
terraform validate -backend=false;
terraform init -backend=false;
terraform validate; test_result=$?
if ((test_result != 0)); then
printf '%s\n' "Terraform Validate Failed" >&2 # write error message to stderr
exit $test_result # or exit $test_result
fi
cd ../../../;
done;

0 comments on commit 7d61c0a

Please sign in to comment.