Sometimes errors show up in continuous integration that don't appear elsewhere. With travis-rerun you can mirror Travis CI to facilitate debugging. You can build the image your job ran on and create a script to run it.
It is strongly suggested that you use travis-rerun on a VM/container as building the disk image will make permanent changes to your system.
Currently, travis-rerun only builds the mega image
which is based on Ubuntu 14.04.3. Following the Travis CI documentation,
travis-rerun should be installed either on the
2015-09-08 revision of 14.04.3
or on a Google Compute Engine instance using the
ubuntu-1404-trusty-v20150909a image (now in the deprecated images list).
Neither choice is without caveats and these are not the only choices.
See the build section for more details before starting. The
Worker Information
section of the job log can help you figure out which
image you need.
In an instance of the appropriate image
wget -q https://raw.githubusercontent.com/thelinuxkid/travis-rerun/master/install-travis-rerun.sh
chmod +x install-travis-rerun.sh
./install-travis-rerun.sh -v
TRAVIS_RERUN_PATH=${TRAVIS_RERUN_PATH:=/opt/travis-rerun}
export GEM_HOME=${GEM_HOME:=$TRAVIS_RERUN_PATH/gems}
export PATH=$PATH:$TRAVIS_RERUN_PATH/src/travis-rerun/bin:$GEM_HOME/bin
This will install this tool and most of its depencies to $TRAVIS_RERUN_PATH
which defaults to /opt/travis-rerun
.
Once built, the mega image is about 16GB. If you decide to use a Google Compute Engine instance for the build make sure you have a storage strategy in place. /usr will be ~6GB, /home ~7GB and TRAVIS_RERUN_PATH ~3GB.
In an instance of the appropriate image
travis-rerun -v image
In an instance of the appropriate image with the Travis CI repo as the first argument and the complete job number as the second.
travis-rerun thelinuxkid/travis-rerun 1.1 > debug.sh
chmod +x debug.sh
./debug.sh