0
votes

Is it possible to configure AWS CodePipeline to not fail the deployment if ApplicationStop script fails? I know I can tick the box when I manually create a deployment via CodeDeploy, however, I can't see any way to do this for deployments created automatically by deploying code via CodePipeline.

Cheers Kris

1
Can you share your application stop script - Prashanna
ps -ef | grep artifact-name.jar | grep -v grep | awk '{print $2}' | xargs kill - Kris
it works if the process is already running, but fails if it is a new instance. Is it worth adding some condition to only run the stop script when process with artifact-name.jar is already running? Maybe change script to something else that automatically stops the process? - Kris
maybe it is worth creating a new pipeline for the new instances being added which doesn't have an ApplicationStop script in the build phase - Kris

1 Answers

0
votes

Turns out that CodeDeploy automatically deploys the newest code to the auto-scaled instances if connected to the auto-scaling group. No need to run the full deploy with ApplicationStop, just need to add ApplicationStart script to launch configuration user data.