Skip to content


Introducing ‘propel’: push to your project the right way

At Stack Builders, we’re big on following best practices in our projects.  We use continuous integration, and pushing to a remote repository generally involves the following steps:

  1. Check to see if the continuous integration build is passing
  2. Pull any upstream changes
  3. Run the local test suite
  4. Push to the remote repository if the local tests are passing

Often, we skipped the first step, since it was annoying to check the CI server manually, and running the local test suite is generally a good enough indication that the world is OK before pushing.  However, when the local build takes upwards of 20 minutes you may not want to wait to see a local failure to find out that CI was failing.  Ideally, you want to check if the remote build is failing, and if it is, wait until it passes before pulling and running the build.

I wrote a gem, propel, that encapsulates this logic into a single command.  It currently works with Jenkins, CI Joe, and Team City, and support for other CI servers is easy to add.  You can have it abort if the CI build is failing, or have it wait for you while someone else fixes the build.

Additionally, it tries to be helpful if you encounter anomalous situations while pushing your changes – if you ended up with a detached HEAD, it aborts with a helpful message before any harm is done to the repository.

Installation is easy – just ‘gem install propel’.  You can run it by simply typing ‘propel’ inside of your local project repository.  Configuring the url of the CI server can be done via the command line, or it can be saved in a .propel file at your project root.

Propel is still pretty new, but it has been working well for us on a few projects.  Check it out and let us know what you think.  Happy propelling!

Posted in Rails, Ruby.


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.