TravisParallelSentinel

Simple parallel build coordination for Travis.

Until https://github.com/travis-ci/travis-ci/issues/929 is resolved, you can use this to coordinate your builds. Install the gem, and you can do the following in your build scripts:

if [ "$(travis_parallel_sentinel script)" = "deploy" ]; then
  :
  # do your deploy work here
fi

The bundled script will return no output for anything but the primary build; for the primary build, it will error out if any of the other builds have, and will return deploy if all went well. This is meant to run as part of your tests, as that will cause your build to error out if the deploy fails.

If you want to have the standard Travis behavior, that is, have builds go green even if the deploy step fails, run the above in your after_X step, but do $(travis_parallel_sentinel after) to include the primary build status in the success assessment.

Installation

Add this line to your application's Gemfile:

gem 'travis_parallel_sentinel'

And then execute:

$ bundle

Or install it yourself as:

$ gem install travis_parallel_sentinel