Skip to content

Commit

Permalink
Fix logic around test results.
Browse files Browse the repository at this point in the history
  • Loading branch information
echoboomer committed Sep 9, 2020
1 parent 8045cdf commit 093ffe3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hooks/command
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ function terraform-opa-run() {
if [[ "${FAIL_STEP}" == true && "${OPA_PASS}" == false ]]; then
echo -e "${cRed}[!] Terraform plan does not meet the policy requirements.${cNone}"
exit 1
elif [[ "${FAIL_STEP}" == false && "${OPA_PASS}" == false ]]; then
echo -e "${cRed}[!] Terraform plan does not meet the policy requirements. Option to fail pipeline step is not enabled. Proceed with caution.${cNone}"
else
echo -e "${cRed}[!] Terraform plan does not meet the policy requirements, but the option to enforce failure is not enabled.${cNone}"
echo -e "${cGreen}[!] Terraform plan meets the policy requirements!${cNone}"
fi
}

Expand Down

0 comments on commit 093ffe3

Please sign in to comment.