Keep capistrano deployment log

Is there a way to save a log (local or saved on a remote server) every time the deployment is done through capistrano? It would be very helpful to keep track of which audit was performed at any point in time in the past.

I know that the deployment process reserves the deployed files for the last 10 deployments in the release directory, but it would be nice to save more history and make it available as a flat file.

+5
source share
2 answers

capistrano sets several useful variables, one of which is called latest_revision, which you can upload to a file.

task :mark_revision do
  log = "#{deploy_to}/revisions.log"
  run "(test -e #{log} || touch #{log} && chmod 666 #{log}) && " +
  "echo #{latest_revision} >> #{log};"
end
+8

, ; , - , -

after :deploy, :mark_revision

imho - :

after :deploy do
    log = "#{deploy_to}/revisions.log"
    run "(test -e #{log} || touch #{log} && chmod 666 #{log}) && " +
    "echo #{latest_revision} >> #{log};"
end

Tracker Capistrano, , - , ; , , , !

Peritor Labs "Webistrano" - , -, , , , - ; Webistrano CI , . Trac: http://labs.peritor.com/webistrano

: https://capistrano.lighthouseapp.com/projects/8716-capistrano/tickets/98-log-deployments

+3

All Articles