How To Fail CodeDeploy When Hook Throws StdErr - Windows

1

Hi, I have CodeDeploy setup with an appspec file that calls a BeforeInstall.cmd and an AfterInstall.cmd. This is run on a Windows EC2 machine. I am finding that when there are stderr that occur within those hook scripts, the main CodeDeploy does not fail but shows as a success. I have seen people mention that you can somehow check the exit code but am unsure how to do this? Can someone shed some light on this please? Essentially, I would like the deployment to fail if there are any stderrs that occur.

thanks

asked 2 years ago82 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions