Does Beanstalk support any deployment commands?

Yes, it sure does. Here are the rules that apply to using commands with a Shell server for deploying from Beanstalk:

  • Each command should be on a separate line.
  • Each line will be executed separately.
  • Each line that begins with the # character will be treated as a comment.
  • Lines are executed in a strict order from top to bottom.
  • If a line fails, the next line will not be executed and the deployment will fail.
  • Environment variables between lines are not shared.
  • Each line is executed in the context of the user home directory.
  • The cd command is not carried to the next line. Please use absolute paths instead.
  • You can use special variables in commands.

If you want to use a complex deployment script, it is better to save it on the server and call it from here. Make sure your script returns proper exit code.

Example of correct script
Each line should be separate.

# Script example
cd /www/my-site; svn up -r %REVISION%
apachectl graceful-restart

Example of incorrect script
This script will not work because the commands on each line are not executable on their own.

if [ -f /tmp/test ]; then
  cd /tmp/test
  svn up -r %REVISION%

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us