From d1923460399db7a0ae7743cad337fe85c3cf4729 Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Wed, 28 Feb 2018 13:52:24 -0500 Subject: [PATCH] [infra] automatically publish new images This tags new images every commit (via Travis) as latest, and every tag gets pushed as a separate tag as well. --- .travis-deploy.sh | 9 +++++++++ .travis.yml | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100755 .travis-deploy.sh diff --git a/.travis-deploy.sh b/.travis-deploy.sh new file mode 100755 index 00000000..6978a7cf --- /dev/null +++ b/.travis-deploy.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -x +docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" + +if [[ -n $TRAVIS_TAG ]]; then + make push VERSION=${TRAVIS_TAG} +else + make push-amd64 +fi diff --git a/.travis.yml b/.travis.yml index 8425c6f4..2c4f066c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,3 +21,13 @@ script: make verify cache: directories: - ~/.glide + +sudo: required +services: +- docker + +deploy: + provider: script + script: bash .travis-deploy.sh + on: + branch: master