From b9f176106d015c80d416abcf27d830663c154b7d Mon Sep 17 00:00:00 2001 From: Huamin Chen Date: Thu, 15 Feb 2018 19:20:43 +0000 Subject: [PATCH] push image into quay.io Signed-off-by: Huamin Chen --- .travis.yml | 5 +++++ Makefile | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 59a9afecf..faa9fe16f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,3 +12,8 @@ before_script: script: - test -z $(gofmt -s -l $GO_FILES) - go vet -v $(go list ./... | grep -v /vendor/) + +deploy: + - if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then + sudo bash -c 'docker login -u "${QUAY_IO_USERNAME}" -p "${QUAY_IO_PASSWORD}" quay.io ; make push-container'; + fi diff --git a/Makefile b/Makefile index 895554795..7b2744342 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,8 @@ container: rbdplugin cp _output/rbdplugin deploy/docker docker build -t $(IMAGE_NAME):$(IMAGE_VERSION) deploy/docker +push-container: container + docker push $(IMAGE_NAME):$(IMAGE_VERSION) clean: go clean -r -x rm -f deploy/docker/rbdplugin