Created
January 11, 2019 00:37
-
-
Save emzxcv/f0253184e87f92fa60b387c311473451 to your computer and use it in GitHub Desktop.
#cfn #wrapper #bash #exitcode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STDERR=$(( aws cloudformation deploy \ | |
--template-file cfn-snsteam.yml \ | |
--stack-name sns-team-message \ | |
--tags Owner=${OWNER} \ | |
CostCentre=${COSTCENTRE} \ | |
Application=enc-sqs-slack-bot \ | |
Project=${PROJECT} \ | |
Environment=${ENVIRONMENT} \ | |
Confidentiality=${CONFIDENTIALITY} \ | |
Compliance=${COMPLIANCE} \ | |
LogRetentionPolicy=${LOGRETENTION} \ | |
--capabilities CAPABILITY_NAMED_IAM ) 2>&1) | |
ERROR_CODE=$? | |
echo ${STDERR} 1>&2 | |
if [[ "${ERROR_CODE}" -eq "255" && "${STDERR}" =~ "No changes to deploy" ]]; then exit 0; fi | |
exit ${ERROR_CODE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment