September 7, 2018

Solved: CodeDeploy - `Exiting on User Command`

As part of CI CD Setup using AWS Developer Tools, have pulled the source code of a hello-world java application from CodeCommit, compiled & packaged using CodeBuild and artifacted to S3 in zip format (hello-world-zip).

Later create CodeDeployDemo application where BeforeInstall phase have been configured to invoke a shell script (say install_dependencies) to install & configure Java & Tomcat.

Well coded & tested script but failed to see some devil in the details

Excerpt from install_dependencies
# Install Java if not yet installed
{ which java; } || { yum install java; }

While installing Java, it failed to with the message Exiting on User Command while looking for input to Is this ok [y/d/N]:


modified the script as mentioned below skip user inputs and could go past the BeforeInstall phase successfully.
# Install Java if not yet installed
{ which java; } || { yum install java -y; }

No comments:

Post a Comment