Push collector docker image when sky-walking released

This commit is contained in:
zhangxin 2017-04-24 17:29:09 +08:00
parent fd02bbe754
commit e4994f0f4e
2 changed files with 25 additions and 0 deletions

View File

@ -13,3 +13,4 @@ script:
after_success:
- mvn clean cobertura:cobertura coveralls:report
- bash ./travis/push_image.sh

24
travis/push_image.sh Normal file
View File

@ -0,0 +1,24 @@
#!/bin/sh
check_pull_is_release() {
if [ "${TRAVIS_TAG}" = "" ]; then
return 1
else
echo "[Pushing] pushing docker image of ${TRAVIS_TAG}."
return 0
fi
}
push_collector_image() {
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
mvn clean package docker:build
docker push skywalking/skywalking-collector:latest
docker push skywalking/skywalking-collector:${TRAVIS_TAG}
}
if check_pull_is_release; then
push_collector_image
echo "[Pushing] push Done!"
fi