- download the 64-bit linux binary
- put it somewhere in
$PATH
, e.g./usr/local/bin/travis-worker
coming soon!
Travis Worker is configured with environment variables or command line flags via the codegangsta/cli library. A list of the non-dynamic flags and environment variables may be found by invoking the built-in help system:
travis-worker --help
Each provider requires its own configuration, which must be provided via
environment variables namespaced by TRAVIS_WORKER_{PROVIDER}_
, e.g. for the
docker provider:
export TRAVIS_WORKER_DOCKER_ENDPOINT="tcp://localhost:4243"
export TRAVIS_WORKER_DOCKER_PRIVILEGED="false"
export TRAVIS_WORKER_DOCKER_CERT_PATH="/etc/secret-docker-cert-stuff"
To inspect the parsed configuration in a format that can be used as a base
environment variable configuration, use the --echo-config
flag, which will
exit immediately after writing to stdout:
travis-worker --echo-config
make
./bin/travis-worker
C-c will stop the worker. Note that any VMs for builds that were still running will have to be cleaned up manually.
Travis Worker has two shutdown modes: Graceful and immediate. The graceful shutdown will tell the worker to not start any additional jobs, but finish the jobs it is currently running before it shuts down. The immediate shutdown will make the worker stop the jobs it's working on and requeue them, and clean up any open resources (shut down VMs, cleanly close connections, etc.)
To start a graceful shutdown, send an INT signal to the worker (for example
using kill -INT
). To start an immediate shutdown, send a TERM signal to the
worker (for example using kill -TERM
).
Travis Worker is built using gb
and dependencies
are vendored into this repository. They are managed with
gb-vendor
.
To work with the dependencies you need to do the following first
- Have this repository checked out
- Install
gb
withgo get github.com/constabulary/gb/...
To update and existing vendored dependency, do the following:
cd ~/code/travis-worker
gb vendor update name/of/package
e.g.gb vendor update github.com/pkg/sftp
To update all the dependencies, do the following:
cd ~/code/travis-worker
gb vendor update --all
To add a new dependency, do the following:
cd ~/code/travis-worker
gb vendor fetch name/of/package
e.g.gb vendor fetch github.com/pkg/sftp
See LICENSE file.
© 2014-2015 Travis CI GmbH