Skip to content

Instantly share code, notes, and snippets.

@gabetax
Created June 10, 2015 21:11
Show Gist options
  • Save gabetax/09f8e7b1f33099259718 to your computer and use it in GitHub Desktop.
Save gabetax/09f8e7b1f33099259718 to your computer and use it in GitHub Desktop.
Consul support on Travis-CI
sudo: false
env:
global:
- CONSUL_VERSION=0.5.0
- CONSUL_DC=dev1
- CONSUL_DIR=$HOME/consul_$CONSUL_VERSION
before_script:
- 'if [[ ! -f $CONSUL_DIR/consul ]]; then (mkdir -p $CONSUL_DIR && cd $CONSUL_DIR && wget https://dl.bintray.com/mitchellh/consul/${CONSUL_VERSION}_linux_amd64.zip && unzip ${CONSUL_VERSION}_linux_amd64.zip); fi'
- $CONSUL_DIR/consul --version
- $CONSUL_DIR/consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul -dc=$CONSUL_DC &
# Wait for consul to elect itself as leader
- sleep 5
cache:
directories:
- $CONSUL_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment