开发者

Deploy tracking with Ruby on Rails and Capistrano

Like every commit has a reason and purpose, I think each deploy has a purpose and reason. Source code commits have a comment. But deploying doesn't have any.

How do I record a reason and purpose for each deploy automatically?

I need to keep a record of:

  • Who deployed to where and what time.
  • Why deployed? Bug fixes? Feature update? Emergency fix not on iteration plan?
  • Which git or svn ref was used?

Have anybody felt the need for this kind of system?开发者_开发知识库 How do you feel about my approach? How can I achieve my goal? I'm currently using Capistrano for deployment.


A bounty added. I'd like to hear more stories from different developers who are doing "continuous deployment".


I found two services that do deploy tracking:

  • Codebase
  • Hoptoad


Webistrano - https://github.com/peritor/webistrano/wiki - is a web interface to capistrano, that also tracks who's deployed what and when, so that could be worth investigating.


My current project uses a modified version of the apinsein's git-deployment recipe, which (when you tell cap to do a deploy) will tag current HEAD with a Git tag (which gives you all the benefits of normal Git commits).


I've built a web service for this exact problem, http://deploytracking.com, it hooks into capistrano and records the time, user, branch, ref, environment and repo that was involved in the deployment.


Strano - The Github backed Capistrano deployment management UI.

Regarding continuous deployment, I also submitted pull request there, which Introduce automatic deployments for GitHub projects, for now it simply triggers deploy task when somebody push to the master branch.


I don't know if it is still relevant but I would like to come up with a different solution. I am building a new deployment tool that does just what you are looking for. I do not intend to spam my stuff here but since I am building something that could help you...

Anyway, have a look here https://alessiosantocs.github.io/Captain. I'm gathering feedback so if you have any please let me know.

Update

As suggested, I'm giving an explanation :)

I have also felt this need. I work in a digital startup and we're constantly deploying stuff 5 days a week on different Ruby on Rails application with Capistrano.

What we noticed was that for every single deployment, we should have done several things:

  • Keep track of which pull requests and commits went online that exact moment
  • Give some sort of a name to the deploy so we could recognize it
  • Alert our team members so that everyone could have been on the same page (without asking us of deployment's news)
  • Keep track of every deployments for future bugs and errors we might find at some point in time (which happened often)

So for this reason we started developing this custom solution that would integrate with Capistrano and our SCM (bitbucket) and keep track of every change we made to our master branch. This is what it does right now.

We are currently tracking deployment environment, repo source, deployment branch and revision. Mainly we manage pull requests, because we found that pull requests, better than commits, did solve an organizational issue in our team (it was difficult to approve other team member's code without a rigid system like PRs)

I would like to explain more about Captain and about our personal dev management strategy with you guys if you want.

Thanks @thirumalaimurugan for asking for clarification!

Update 2

We tried git tagging too. It was good and fun at the beginning but we couldn't manage them very well.

A tag is basically a bookmark to a specific revision. So we're talking about commits. A tag keeps no track of pull requests. It was quite a mess for us.

I don't think they're bad at what you're trying to achieve, but I think there must be some other solutions that could fit exactly your (and our too) problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜