From 38b9256340d50ac991103ef9058010432517cd43 Mon Sep 17 00:00:00 2001 From: zhangxin Date: Mon, 24 Apr 2017 17:53:44 +0800 Subject: [PATCH] modify deploy to push --- .travis.yml | 2 +- travis/{deploy_image.sh => push_image.sh} | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) rename travis/{deploy_image.sh => push_image.sh} (58%) diff --git a/.travis.yml b/.travis.yml index 20e7b77be..b827e3968 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ script: after_success: - mvn clean cobertura:cobertura coveralls:report - - bash ./travis/deploy_image.sh + - bash ./travis/push_image.sh diff --git a/travis/deploy_image.sh b/travis/push_image.sh similarity index 58% rename from travis/deploy_image.sh rename to travis/push_image.sh index 425e41d00..f701c22ee 100644 --- a/travis/deploy_image.sh +++ b/travis/push_image.sh @@ -1,16 +1,16 @@ #!/bin/sh -check_pull_is_tag_or_release() { +check_pull_is_release() { if [ "${TRAVIS_TAG}" = "" ]; then return 1 else - echo "[Deploying] deploy tag ${TRAVIS_TAG}." + echo "[Pushing] pushing docker image of ${TRAVIS_TAG}." return 0 fi } -deploy_collector_image() { +push_collector_image() { docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" mvn clean package docker:build docker push skywalking/skywalking-collector:latest @@ -18,7 +18,7 @@ deploy_collector_image() { } -if check_pull_is_tag_or_release; then - deploy_collector_image - echo "[Deploying] deploy Done!" +if check_pull_is_release; then + push_collector_image + echo "[Pushing] push Done!" fi \ No newline at end of file -- GitLab