fix the image name of collector issue and push docker images when skywalking is tagged and the branch is master

This commit is contained in:
zhangxin 2017-04-25 13:48:12 +08:00
parent be901d52fe
commit 86f22f7e83
2 changed files with 10 additions and 4 deletions

View File

@ -101,7 +101,7 @@
<version>${docker.plugin.version}</version>
<configuration>
<skipDocker>false</skipDocker>
<imageName>${docker.cache.imageName}</imageName>
<imageName>skywalking/${docker.cache.imageName}</imageName>
<imageTags>
<imageTag>${docker.imageTag.version}</imageTag>
</imageTags>

View File

@ -1,13 +1,19 @@
#!/bin/sh
check_pull_is_tagged() {
if [ "${TRAVIS_TAG}" = "" ]; then
if [ "${TRAVIS_TAG}" == "" ]; then
return 1
else
echo "Push the collector image of ${TRAVIS_TAG} version."
return 0
fi
}
check_branch_is_master(){
if [ "${TRAVIS_BRANCH}" == "master" ]; then
return 0;
else
return 1;
fi
}
push_collector_image() {
@ -18,7 +24,7 @@ push_collector_image() {
}
if check_pull_is_tagged; then
if check_pull_is_tagged && check_branch_is_master; then
push_collector_image
echo "Push is Done!"
fi