Continuous Delivery with Travis-CI & Giant Swarm

Recently I enhanced my Travis-CI build for Chatty:

  • I create a docker image on the fly
  • I push it to Docker Hub
  • I push it to Giant Swarm and update the chatty-server component

So every time I push a commit to GitHub, just a few minutes later the new version of Chatty is alive at

Here are the relevant parts of my .travis.yml to accomplish this:

sudo: required

  - docker

  - curl -O
  - sudo tar xzf swarm-0.24.1-linux-amd64.tar.gz -C /usr/local/bin

  - docker build -t kaitoedter/chatty .
  - docker login --email="$DOCKER_EMAIL" --username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD"
  - docker push kaitoedter/chatty

  - swarm login $SWARM_USER -p $SWARM_PASSWORD
  - sudo docker tag -f kaitoedter/chatty
  - docker push
  - swarm update chatty/chatty-server

The credentials for Docker Hub and Giant Swarm can be stored in environment variables using the Travis-CI Web UI.

1 Comment

  1. Marian SteinbachNovember 30, 2015

    Thanks Kai for demonstrating this!

    If you always want to download the latest CLI release, we provide this URL to fetch the latest version number:

Leave a Reply

I accept the Privacy Policy