Application Release Tracking & Version Numbers


#1

Forgive me if this has been solved in its entirety, although I’ve only
seen bits and pieces of this solved in various ways. I’m hoping a few
of you have figured out an elegant solution to this problem.

Over time I’ve noticed that it would be immensely helpful if we were
able to easily correlate which git commit version was running in all
of our environments of our application. Capistrano is kind and stores
this deployment version value in REVISION, and the deployment time in
the timestamp of the deployment directory.

Seth L. wrote about a couple of helper methods he wrote to acquire
these values at
http://blog.semergence.com/2008/11/03/displaying-deployment-date-and-time-and-git-revision-number-in-rails-views

I’d like to take this up a notch and mark known good commits with
releases (i.e. 1.0, 1.1, 1.2, 1.2.1, etc). At the footer of all pages,
it would be excellent to be able to see something like “PROD - 1.0
(3425)” (ENVIRONMENT - VERSION (BUILD)) where BUILD corresponds to a
git commit hash (somehow). I’d like to be able to catalog which commit
hash maps to which version (and do this semi-automatically, through a
rake/cap task, aka: cap deploy:version:increment only when a major/
minor release occurs).

Then, I’d also like to extract all dependency version numbers, and
combine all of this into exception reporting. So when an exception is
thrown (gracefully to the end user with an error page), email is
generated with:

environment (production, staging, development, etc)
particular app server hostname/ip/port
app version (1.0, 1.0.1, 1.2, 1.3, etc)
build version (3425)
git commit hash
dependent gems and plugins
versions of each gem and plugin REQUIRED for the release
versions of each gem and plugin installed

Is anyone aware of a single tool that has combined all of this
together? There are certainly some solutions, such as
exception_notifier, hoptoad, etc, which do the exception
notifications, but do not handle “release management” or release
correlation.

If not, I think this might be worthy of a plugin or gem that I’d
consider building.

-Kevin


#2

With a day to let this sit, I thought more about it (and did more
searches), and did not find anything compartmentalized to handle this.
I’ll probably move forward with making this into a gem. Is anyone
interested? Are there particular features you’d like to see this handle?

-Kevin


#3

Hey Kevin,

I’m interested to hear how you’ve done in this endeavour. I am about to
embark on the same task and I’d like to reuse your code if you’re
willing.

Thanks,

Peter F.
(847) 687-7646
Email: removed_email_address@domain.invalid
IM GTalk: peter.fitzgibbons
IM AOL: removed_email_address@domain.invalid