From 29c72d25959c2785dcc1af34d3764da6832990b0 Mon Sep 17 00:00:00 2001 From: zhangxin Date: Tue, 25 Apr 2017 13:48:12 +0800 Subject: [PATCH] fix the image name of collector issue and push docker images when skywalking is tagged and the branch is master --- .travis.yml | 5 +++++ .../skywalking-collector-worker/pom.xml | 2 +- travis/push_image.sh | 12 +++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index b827e3968..69492c506 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,8 @@ +sudo: required + +services: + - docker + language: java install: - cd ci-dependencies diff --git a/skywalking-collector/skywalking-collector-worker/pom.xml b/skywalking-collector/skywalking-collector-worker/pom.xml index fdae9454e..1045cb715 100644 --- a/skywalking-collector/skywalking-collector-worker/pom.xml +++ b/skywalking-collector/skywalking-collector-worker/pom.xml @@ -101,7 +101,7 @@ ${docker.plugin.version} false - ${docker.cache.imageName} + skywalking/${docker.cache.imageName} ${docker.imageTag.version} diff --git a/travis/push_image.sh b/travis/push_image.sh index 598633439..a9f82f123 100644 --- a/travis/push_image.sh +++ b/travis/push_image.sh @@ -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 \ No newline at end of file