From 0823aebc723ee9ecfc08531be715c3cfa3519e7d 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 | 6 ++++++ .travis.yml | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100755 .travis-deploy.sh diff --git a/.travis-deploy.sh b/.travis-deploy.sh new file mode 100755 index 00000000..93b54e72 --- /dev/null +++ b/.travis-deploy.sh @@ -0,0 +1,6 @@ +#!/bin/bash +docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" +docker push directxman12/k8s-prometheus-provider:latest +if [[ -n $TRAVIS_TAG ]]; then + docker push directxman12/k8s-prometheus-provider:$TRAVIS_TAG +fi diff --git a/.travis.yml b/.travis.yml index 8425c6f4..6ee4bdee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,3 +21,9 @@ script: make verify cache: directories: - ~/.glide + +deploy: + provider: script + script: .travis-deploy.sh + on: + branch: master