Send an HTTP request from a shell script on deployment

Is there a way to execute a custom shell script on deployment (AWS, Rails application)? This is needed for integration with Rollbar service to track deployment changes. Here is the script code:

You probably already figured this out, but:

  • create a .cloud66 directory in the root of your rails application
  • put your gist into .cloud66/scripts/
  • create the file .cloud66/deploy_hooks.yml with the following contents:

``` default: &default last_thing: - command: cd $RAILS_BASE_PATH/releases/$(ls -t $RAILS_BASE_PATH/releases | head -1) && sh .cloud66/scripts/ target: any execute: true sudo: true # not sure if you will need this?

production: «: *default

staging: «: *default


You might want after_rails hook instead, not sure. See

NOTE: for the command cd, you might be able to just use cd $STACK_PATH but not sure which hook sets that up

You must be logged in to answer this question