This commit is contained in:
zhangxin 2017-04-24 17:29:09 +08:00
parent fd02bbe754
commit 6d9df9ef2c
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/deploy_image.sh

24
travis/deploy_image.sh Normal file
View File

@ -0,0 +1,24 @@
#!/bin/sh
check_pull_is_tag_or_release() {
if [ "${TRAVIS_TAG}" = "" ]; then
return 1
else
echo "[Deploying] deploy tag ${TRAVIS_TAG}."
return 0
fi
}
deploy_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_tag_or_release; then
deploy_collector_image
echo "[Deploying] deploy Done!"
fi