diff --git a/.travis.yml b/.travis.yml index 2e441be..262efcc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,17 @@ language: generic sudo: required + services: - docker + script: - make verify build test images + deploy: provider: script script: build/deploy.sh skip_cleanup: true on: repo: munnerz/keepalived-cloud-provider + tags: true branch: master \ No newline at end of file diff --git a/build/deploy.sh b/build/deploy.sh index b5a1dd5..707c287 100755 --- a/build/deploy.sh +++ b/build/deploy.sh @@ -5,5 +5,10 @@ export REGISTRY=quay.io/munnerz/ docker login -e="${QUAY_EMAIL}" -u "${QUAY_USERNAME}" -p "${QUAY_PASSWORD}" quay.io -echo "Pushing images with sha tag." -make push +if [ "${TRAVIS_TAG}" = "" ]; then + echo "Pushing images with sha tag." + make push +else + echo "Pushing images with release tag." + make push MUTABLE_TAG=latest VERSION="${TRAVIS_TAG}" +fi