Merge pull request #22 from rootfs/image-repo

add deploy script
This commit is contained in:
Huamin Chen 2018-02-15 15:55:59 -05:00 committed by GitHub
commit 05e4accead
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -13,7 +13,7 @@ script:
- test -z $(gofmt -s -l $GO_FILES) - test -z $(gofmt -s -l $GO_FILES)
- go vet -v $(go list ./... | grep -v /vendor/) - go vet -v $(go list ./... | grep -v /vendor/)
after_success: deploy:
- if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then - provider: script
sudo bash -c 'docker login -u "${QUAY_IO_USERNAME}" -p "${QUAY_IO_PASSWORD}" quay.io ; make push-container'; script:
fi - ./deploy.sh

6
deploy.sh Executable file
View File

@ -0,0 +1,6 @@
#/bin/bash
if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
docker login -u "${QUAY_IO_USERNAME}" -p "${QUAY_IO_PASSWORD}" quay.io
make push-container
fi