Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
======================================================================
Usage: cap <target> deploy [-s branch=<branch or tag>] [-s asset=true]
======================================================================
* executing `staging'
* executing `deploy'
triggering before callbacks for `deploy'
* executing `hipchat:trigger_notification'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
triggering before callbacks for `deploy:update_code'
* executing `deploy:set_deploy_vars'
---> DEPLOYING RELEASE: master
* executing `hipchat:notify_deploy_started'
executing locally: "git ls-remote git@github.com:beRecruited/beRecruited.git master"
command finished in 1586ms
updating the cached checkout on all servers
* executing multiple commands in parallel
-> "else" :: "if [ -d /home/be/rails/shared/cached-copy ]; then cd /home/be/rails/shared/cached-copy && git fetch origin && git fetch --tags origin && git reset --hard 58ea728e03427ddc7c884d973d83ba0641a9764a && git clean -d -x -f; else git clone -b master git@github.com:beRecruited/beRecruited.git /home/be/rails/shared/cached-copy && cd /home/be/rails/shared/cached-copy && git checkout -b deploy 58ea728e03427ddc7c884d973d83ba0641a9764a; fi"
-> "else" :: "if [ -d /home/be/rails/shared/cached-copy ]; then cd /home/be/rails/shared/cached-copy && git fetch origin && git fetch --tags origin && git reset --hard 58ea728e03427ddc7c884d973d83ba0641a9764a && git clean -d -x -f; else git clone -b master git@github.com:beRecruited/beRecruited.git /home/be/rails/shared/cached-copy && cd /home/be/rails/shared/cached-copy && git checkout -b deploy 58ea728e03427ddc7c884d973d83ba0641a9764a; fi"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
** [stage-app.berecruited.com :: out] HEAD is now at 58ea728 trying to make registration spec more stable
** [stage-web.berecruited.com :: out] HEAD is now at 58ea728 trying to make registration spec more stable
command finished in 2453ms
copying the cached version to /home/be/rails/releases/20140925193923
* executing multiple commands in parallel
-> "else" :: "cp -RPp /home/be/rails/shared/cached-copy /home/be/rails/releases/20140925193923 && (echo 58ea728e03427ddc7c884d973d83ba0641a9764a > /home/be/rails/releases/20140925193923/REVISION)"
-> "else" :: "cp -RPp /home/be/rails/shared/cached-copy /home/be/rails/releases/20140925193923 && (echo 58ea728e03427ddc7c884d973d83ba0641a9764a > /home/be/rails/releases/20140925193923/REVISION)"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 1533ms
* executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* executing `deploy:assets:symlink'
* executing multiple commands in parallel
-> "else" :: "rm -rf /home/be/rails/releases/20140925193923/public/assets && mkdir -p /home/be/rails/releases/20140925193923/public && mkdir -p /home/be/rails/shared/assets && ln -s /home/be/rails/shared/assets /home/be/rails/releases/20140925193923/public/assets"
-> "else" :: "rm -rf /home/be/rails/releases/20140925193923/public/assets && mkdir -p /home/be/rails/releases/20140925193923/public && mkdir -p /home/be/rails/shared/assets && ln -s /home/be/rails/shared/assets /home/be/rails/releases/20140925193923/public/assets"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 262ms
* executing `bundle:install'
* executing multiple commands in parallel
-> "else" :: "cd /home/be/rails/releases/20140925193923 && bundle install --gemfile /home/be/rails/releases/20140925193923/Gemfile --path /home/be/rails/shared/bundle --deployment --quiet --without development test"
-> "else" :: "cd /home/be/rails/releases/20140925193923 && bundle install --gemfile /home/be/rails/releases/20140925193923/Gemfile --path /home/be/rails/shared/bundle --deployment --quiet --without development test"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-web.berecruited.com] executing command
[stage-app.berecruited.com] executing command
command finished in 965ms
* executing multiple commands in parallel
-> "else" :: "chmod -R -- g+w /home/be/rails/releases/20140925193923 && rm -rf -- /home/be/rails/releases/20140925193923/public/system && mkdir -p -- /home/be/rails/releases/20140925193923/public/ && ln -s -- /home/be/rails/shared/system /home/be/rails/releases/20140925193923/public/system && rm -rf -- /home/be/rails/releases/20140925193923/log && ln -s -- /home/be/rails/shared/log /home/be/rails/releases/20140925193923/log && rm -rf -- /home/be/rails/releases/20140925193923/tmp/pids && mkdir -p -- /home/be/rails/releases/20140925193923/tmp/ && ln -s -- /home/be/rails/shared/pids /home/be/rails/releases/20140925193923/tmp/pids"
-> "else" :: "chmod -R -- g+w /home/be/rails/releases/20140925193923 && rm -rf -- /home/be/rails/releases/20140925193923/public/system && mkdir -p -- /home/be/rails/releases/20140925193923/public/ && ln -s -- /home/be/rails/shared/system /home/be/rails/releases/20140925193923/public/system && rm -rf -- /home/be/rails/releases/20140925193923/log && ln -s -- /home/be/rails/shared/log /home/be/rails/releases/20140925193923/log && rm -rf -- /home/be/rails/releases/20140925193923/tmp/pids && mkdir -p -- /home/be/rails/releases/20140925193923/tmp/ && ln -s -- /home/be/rails/shared/pids /home/be/rails/releases/20140925193923/tmp/pids"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 409ms
triggering after callbacks for `deploy:finalize_update'
* executing `deploy:fix_symlinks'
* executing multiple commands in parallel
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/database.yml && ln -s /home/be/rails/shared/config/database.yml /home/be/rails/releases/20140925193923/config/database.yml"
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/database.yml && ln -s /home/be/rails/shared/config/database.yml /home/be/rails/releases/20140925193923/config/database.yml"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-web.berecruited.com] executing command
[stage-app.berecruited.com] executing command
command finished in 343ms
* executing multiple commands in parallel
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/resque.yml && ln -s /home/be/rails/shared/config/resque.yml /home/be/rails/releases/20140925193923/config/resque.yml"
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/resque.yml && ln -s /home/be/rails/shared/config/resque.yml /home/be/rails/releases/20140925193923/config/resque.yml"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 283ms
* executing multiple commands in parallel
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/sunspot.yml && ln -s /home/be/rails/shared/config/sunspot.yml /home/be/rails/releases/20140925193923/config/sunspot.yml"
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/sunspot.yml && ln -s /home/be/rails/shared/config/sunspot.yml /home/be/rails/releases/20140925193923/config/sunspot.yml"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-web.berecruited.com] executing command
[stage-app.berecruited.com] executing command
command finished in 342ms
* executing multiple commands in parallel
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/secrets.yml && ln -s /home/be/rails/shared/config/secrets.yml /home/be/rails/releases/20140925193923/config/secrets.yml"
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/secrets.yml && ln -s /home/be/rails/shared/config/secrets.yml /home/be/rails/releases/20140925193923/config/secrets.yml"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 289ms
* executing multiple commands in parallel
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/memcached.yml && ln -s /home/be/rails/shared/config/memcached.yml /home/be/rails/releases/20140925193923/config/memcached.yml"
-> "else" :: "rm -f /home/be/rails/releases/20140925193923/config/memcached.yml && ln -s /home/be/rails/shared/config/memcached.yml /home/be/rails/releases/20140925193923/config/memcached.yml"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-web.berecruited.com] executing command
[stage-app.berecruited.com] executing command
command finished in 320ms
* executing multiple commands in parallel
-> "else" :: "git ls-remote git@github.com:beRecruited/beRecruited.git master >> /home/be/rails/releases/20140925193923/public/VERSION.txt"
-> "else" :: "git ls-remote git@github.com:beRecruited/beRecruited.git master >> /home/be/rails/releases/20140925193923/public/VERSION.txt"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 1126ms
triggering after callbacks for `deploy:update_code'
* executing `deploy:assets:precompile'
triggering before callbacks for `deploy:assets:precompile'
* executing `deploy:assets:update_asset_mtimes'
* executing "[ -e /home/be/rails/shared/assets/manifest* ] && cat /home/be/rails/shared/assets/manifest* || echo"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 675ms
** Updating mtimes for ~3120 assets...
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
** scp upload #<StringIO:0x007fca324d7b38> -> /home/be/rails/TOUCH_ASSETS
[stage-app.berecruited.com] /home/be/rails/TOUCH_ASSETS
[stage-web.berecruited.com] /home/be/rails/TOUCH_ASSETS
* scp upload complete
* executing multiple commands in parallel
-> "else" :: "cat /home/be/rails/TOUCH_ASSETS | while read asset; do touch -c -- \"$asset\"; done && rm -f -- /home/be/rails/TOUCH_ASSETS"
-> "else" :: "cat /home/be/rails/TOUCH_ASSETS | while read asset; do touch -c -- \"$asset\"; done && rm -f -- /home/be/rails/TOUCH_ASSETS"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 5469ms
* executing multiple commands in parallel
-> "else" :: "cd -- /home/be/rails/releases/20140925193923 && RAILS_ENV=stage RAILS_GROUPS=assets bundle exec rake assets:precompile"
-> "else" :: "cd -- /home/be/rails/releases/20140925193923 && RAILS_ENV=stage RAILS_GROUPS=assets bundle exec rake assets:precompile"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
** [out :: stage-app.berecruited.com] Resque::Helpers will be gone with no replacement in Resque 2.0.0.
** [out :: stage-web.berecruited.com] Resque::Helpers will be gone with no replacement in Resque 2.0.0.
command finished in 50762ms
* executing "ls -1 /home/be/rails/shared/assets/manifest* | wc -l"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 246ms
* executing "ls /home/be/rails/shared/assets/manifest*"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 253ms
* executing "ls -x /home/be/rails/releases"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 246ms
* executing multiple commands in parallel
-> "else" :: "cp -- /home/be/rails/shared/assets/manifest.yml /home/be/rails/releases/20140925193923/assets_manifest.yml"
-> "else" :: "cp -- /home/be/rails/shared/assets/manifest.yml /home/be/rails/releases/20140925193923/assets_manifest.yml"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 252ms
* executing `deploy:cleanup'
* executing multiple commands in parallel
-> "else" :: "ls -1dt /home/be/rails/releases/* | tail -n +6 | xargs rm -rf"
-> "else" :: "ls -1dt /home/be/rails/releases/* | tail -n +6 | xargs rm -rf"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 882ms
triggering after callbacks for `deploy:cleanup'
* executing `deploy:assets:clean_expired'
* executing "for manifest in /home/be/rails/releases/*/assets_manifest.*; do cat -- \"$manifest\" 2> /dev/null && printf ':::' || true; done"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 759ms
** Fetched 3 manifests from /home/be/rails/releases/*/assets_manifest.*
** Writing required assets to /home/be/rails/REQUIRED_ASSETS...
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
** scp upload #<StringIO:0x007fca321155e0> -> /home/be/rails/REQUIRED_ASSETS
[stage-app.berecruited.com] /home/be/rails/REQUIRED_ASSETS
[stage-web.berecruited.com] /home/be/rails/REQUIRED_ASSETS
* scp upload complete
** Removing assets that haven't been deployed for 10080 minutes...
* executing multiple commands in parallel
-> "else" :: "cd -- /home/be/rails/ && LC_COLLATE=C sort REQUIRED_ASSETS -o REQUIRED_ASSETS && cd -- /home/be/rails/shared/assets/ && for f in $( find * -mmin +10080 -type f | LC_COLLATE=C sort | LC_COLLATE=C comm -23 -- - /home/be/rails/REQUIRED_ASSETS ); do echo \"Removing unneeded asset: $f\"; rm -f -- \"$f\"; done; rm -f -- /home/be/rails/REQUIRED_ASSETS"
-> "else" :: "cd -- /home/be/rails/ && LC_COLLATE=C sort REQUIRED_ASSETS -o REQUIRED_ASSETS && cd -- /home/be/rails/shared/assets/ && for f in $( find * -mmin +10080 -type f | LC_COLLATE=C sort | LC_COLLATE=C comm -23 -- - /home/be/rails/REQUIRED_ASSETS ); do echo \"Removing unneeded asset: $f\"; rm -f -- \"$f\"; done; rm -f -- /home/be/rails/REQUIRED_ASSETS"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 278ms
* executing `deploy:create_symlink'
triggering before callbacks for `deploy:create_symlink'
* executing `deploy:web:disable'
* executing multiple commands in parallel
-> "else" :: "cp /home/be/rails/shared/config/maintenance.html /home/be/rails/shared/system/maintenance.html"
-> "else" :: "cp /home/be/rails/shared/config/maintenance.html /home/be/rails/shared/system/maintenance.html"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-web.berecruited.com] executing command
[stage-app.berecruited.com] executing command
command finished in 362ms
* executing multiple commands in parallel
-> "else" :: "rm -f /home/be/rails/current && ln -s /home/be/rails/releases/20140925193923 /home/be/rails/current"
-> "else" :: "rm -f /home/be/rails/current && ln -s /home/be/rails/releases/20140925193923 /home/be/rails/current"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 251ms
** transaction: commit
* executing `deploy:restart'
* executing multiple commands in parallel
-> "else" :: "touch /home/be/rails/current/tmp/restart.txt"
-> "else" :: "touch /home/be/rails/current/tmp/restart.txt"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-web.berecruited.com] executing command
[stage-app.berecruited.com] executing command
command finished in 357ms
triggering after callbacks for `deploy'
* executing `deploy:fix_resque_web'
* executing "cd /home/be/rails/current && bundle show resque"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 727ms
* executing multiple commands in parallel
-> "else" :: "cd /home/be/rails/current ; rm -f public/be_resque ; ln -s /home/be/rails/shared/bundle/ruby/2.1.0/gems/resque-1.25.1\\\n/lib/resque/server/public public/be_resque"
-> "else" :: "cd /home/be/rails/current ; rm -f public/be_resque ; ln -s /home/be/rails/shared/bundle/ruby/2.1.0/gems/resque-1.25.1\\\n/lib/resque/server/public public/be_resque"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 314ms
* executing `migrate'
* executing "cd /home/be/rails/current; RAILS_ENV=stage bundle exec rake db:migrate"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
** [out :: stage-app.berecruited.com] Resque::Helpers will be gone with no replacement in Resque 2.0.0.
command finished in 5829ms
* executing `deploy:web:enable'
* executing multiple commands in parallel
-> "else" :: "rm -f /home/be/rails/shared/system/maintenance.html"
-> "else" :: "rm -f /home/be/rails/shared/system/maintenance.html"
servers: ["stage-app.berecruited.com", "stage-web.berecruited.com"]
[stage-app.berecruited.com] executing command
[stage-web.berecruited.com] executing command
command finished in 248ms
triggering after callbacks for `deploy:web:enable'
* executing `complete'
>>>>>> DONE DEPLOYING <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
triggering after callbacks for `complete'
* executing `newrelic:notice_deployment'
* Getting log of changes for New Relic Deployment details
* executing "cat /home/be/rails/current/REVISION"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 249ms
* executing "cat /home/be/rails/releases/20140925185905/REVISION"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 250ms
* executing locally: 'git ls-remote git@github.com:beRecruited/beRecruited.git master'
* Uploading deployment to New Relic
Recorded deployment to 'beRecruited Rails (stage)' (2014-09-25 12:40:44 -0700)
** Uploaded deployment information to New Relic
* executing `restart_resque'
Restarting Resque
* executing "sudo monit stop all"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 264ms
* executing "sudo monit start all"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 274ms
* executing `airbrake:deploy'
triggering before callbacks for `airbrake:deploy'
* executing `set_airbrake_env'
** Notifying Airbrake of Deploy (cd /home/be/rails/releases/20140925193923; bundle exec rake RACK_ENV=production RAILS_ENV=stage airbrake:deploy TO=stage REVISION=58ea728e03427ddc7c884d973d83ba0641a9764a REPO=git@github.com:beRecruited/beRecruited.git USER=jonm)
* executing "cd /home/be/rails/releases/20140925193923; bundle exec rake RACK_ENV=production RAILS_ENV=stage airbrake:deploy TO=stage REVISION=58ea728e03427ddc7c884d973d83ba0641a9764a REPO=git@github.com:beRecruited/beRecruited.git USER=jonm"
servers: ["stage-app.berecruited.com"]
[stage-app.berecruited.com] executing command
command finished in 3587ms
** Airbrake Notification Complete.
* executing `hipchat:notify_deploy_finished'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment