Skip to content

Instantly share code, notes, and snippets.

@MettaAudio
Created August 15, 2013 04:31
Show Gist options
  • Save MettaAudio/6238286 to your computer and use it in GitHub Desktop.
Save MettaAudio/6238286 to your computer and use it in GitHub Desktop.
➜ site git:(spree_fetcher) cap deploy
triggering load callbacks
* 2013-08-14 23:57:39 executing `development'
triggering start callbacks for `deploy'
* 2013-08-14 23:57:39 executing `multistage:ensure'
* 2013-08-14 23:57:39 executing `deploy'
* 2013-08-14 23:57:39 executing `deploy:update'
** transaction: start
* 2013-08-14 23:57:39 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git@github.com:railsdog/aloha.git spree_fetcher"
command finished in 884ms
* executing "if [ -d /u/apps/site/shared/cached-copy ]; then cd /u/apps/site/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 36ac7aa7fd188eb7765b79ca6746b507187c7016 && git clean -q -d -x -f; else git clone -q -b spree_fetcher git@github.com:railsdog/aloha.git /u/apps/site/shared/cached-copy && cd /u/apps/site/shared/cached-copy && git checkout -q -b deploy 36ac7aa7fd188eb7765b79ca6746b507187c7016; fi"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 2647ms
copying the cached version from /u/apps/site/shared/cached-copy/site to /u/apps/site/releases/20130815035743
* executing "cp -RPp /u/apps/site/shared/cached-copy/site /u/apps/site/releases/20130815035743 && (echo 36ac7aa7fd188eb7765b79ca6746b507187c7016 > /u/apps/site/releases/20130815035743/REVISION)"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 177ms
* 2013-08-14 23:57:43 executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* 2013-08-14 23:57:43 executing `deploy:assets:symlink'
* executing "rm -rf /u/apps/site/releases/20130815035743/public/assets && mkdir -p /u/apps/site/releases/20130815035743/public && mkdir -p /u/apps/site/shared/assets && ln -s /u/apps/site/shared/assets /u/apps/site/releases/20130815035743/public/assets"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 39ms
triggering after callbacks for `deploy:assets:symlink'
* 2013-08-14 23:57:43 executing `deploy:copy_shared_assets_gem'
* executing "rm /u/apps/site/releases/20130815035743/vendor/aloha_shared_assets"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 16ms
* executing "cp -RPp /u/apps/site/shared/cached-copy/aloha_shared_assets /u/apps/site/releases/20130815035743/vendor"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 33ms
* 2013-08-14 23:57:43 executing `bundle:install'
* executing "cd /u/apps/site/releases/20130815035743 && bundle install --gemfile /u/apps/site/releases/20130815035743/Gemfile --path /u/apps/site/shared/bundle --deployment --quiet --without development test"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
*** [err :: 192.168.50.2] fatal: Not a git repository (or any of the parent directories): .git
command finished in 9340ms
* executing "chmod -R -- g+w /u/apps/site/releases/20130815035743 && rm -rf -- /u/apps/site/releases/20130815035743/public/system && mkdir -p -- /u/apps/site/releases/20130815035743/public/ && ln -s -- /u/apps/site/shared/system /u/apps/site/releases/20130815035743/public/system && rm -rf -- /u/apps/site/releases/20130815035743/log && ln -s -- /u/apps/site/shared/log /u/apps/site/releases/20130815035743/log && rm -rf -- /u/apps/site/releases/20130815035743/tmp/pids && mkdir -p -- /u/apps/site/releases/20130815035743/tmp/ && ln -s -- /u/apps/site/shared/pids /u/apps/site/releases/20130815035743/tmp/pids"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 60ms
triggering after callbacks for `deploy:update_code'
* 2013-08-14 23:57:52 executing `deploy:assets:precompile'
triggering before callbacks for `deploy:assets:precompile'
* 2013-08-14 23:57:52 executing `deploy:assets:update_asset_mtimes'
* executing "[ -e /u/apps/site/shared/assets/manifest* ] && cat /u/apps/site/shared/assets/manifest* || echo"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 19ms
** Updating mtimes for ~1288 assets...
servers: ["192.168.50.2"]
** scp upload #<StringIO:0x007fb1e500bbf0> -> /u/apps/site/TOUCH_ASSETS
[192.168.50.2] /u/apps/site/TOUCH_ASSETS
* scp upload complete
* executing "cat /u/apps/site/TOUCH_ASSETS | while read asset; do touch -c -- \"$asset\"; done && rm -f -- /u/apps/site/TOUCH_ASSETS"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 1121ms
* executing "cd -- /u/apps/site/releases/20130815035743 && RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
*** [err :: 192.168.50.2] fatal: Not a git repository (or any of the parent directories): .git
*** [err :: 192.168.50.2] fatal: Not a git repository (or any of the parent directories): .git
*** [err :: 192.168.50.2] fatal: Not a git repository (or any of the parent directories): .git
command finished in 62042ms
* executing "ls -1 /u/apps/site/shared/assets/manifest* | wc -l"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 65ms
* executing "ls /u/apps/site/shared/assets/manifest*"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 5ms
* executing "ls -x /u/apps/site/releases"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 8ms
* executing "cp -- /u/apps/site/shared/assets/manifest.yml /u/apps/site/releases/20130815035743/assets_manifest.yml"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 8ms
* 2013-08-14 23:58:56 executing `deploy:create_symlink'
* executing "rm -f /u/apps/site/current && ln -s /u/apps/site/releases/20130815035743 /u/apps/site/current"
servers: ["192.168.50.2"]
[192.168.50.2] executing command
command finished in 20ms
** transaction: commit
* 2013-08-14 23:58:56 executing `deploy:restart'
triggering after callbacks for `deploy:restart'
* 2013-08-14 23:58:56 executing `unicorn:restart'
triggering before callbacks for `unicorn:restart'
* executing "if [ -e /u/apps/site/current/tmp/pids/unicorn.pid ] && kill -0 `cat /u/apps/site/current/tmp/pids/unicorn.pid` > /dev/null 2>&1; then\\\n echo \"Duplicating Unicorn...\";\\\n kill -s USR2 `cat /u/apps/site/current/tmp/pids/unicorn.pid`;\\\n else\\\n if [ -e /u/apps/site/current/config/unicorn.rb ]; then\\\n UNICORN_CONFIG_PATH=/u/apps/site/current/config/unicorn.rb;\\\n else\\\n if [ -e /u/apps/site/current/config/unicorn/production.rb ]; then\\\n UNICORN_CONFIG_PATH=/u/apps/site/current/config/unicorn/production.rb;\\\n else\\\n echo \"Config file for \"production\" environment was not found at either \"/u/apps/site/current/config/unicorn.rb\" or \"/u/apps/site/current/config/unicorn/production.rb\"\";\\\n exit 1;\\\n fi;\\\n fi;\\\n\\\n if [ -e /u/apps/site/current/tmp/pids/unicorn.pid ]; then\\\n if kill -0 `cat /u/apps/site/current/tmp/pids/unicorn.pid` > /dev/null 2>&1; then\\\n echo \"Unicorn is already running!\";\\\n exit 0;\\\n fi;\\\n\\\n rm /u/apps/site/current/tmp/pids/unicorn.pid;\\\n fi;\\\n\\\n echo \"Starting Unicorn...\";\\\n cd /u/apps/site/current && BUNDLE_GEMFILE=/u/apps/site/current/Gemfile bundle exec unicorn -c $UNICORN_CONFIG_PATH -E production -D;\\\n\\\n fi;\\\n\\\n\\\n sleep 2; # in order to wait for the (old) pidfile to show up\\\n\\\n if [ -e /u/apps/site/current/tmp/pids/unicorn.pid.oldbin ] && kill -0 `cat /u/apps/site/current/tmp/pids/unicorn.pid.oldbin` > /dev/null 2>&1; then\\\n kill -s QUIT `cat /u/apps/site/current/tmp/pids/unicorn.pid.oldbin`;\\\n fi;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment