From 5ca969b3db9b82072979e143dfc617212f7fa38a Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Fri, 16 Aug 2019 00:20:19 +0800 Subject: [PATCH] updated README badges --- Jenkinsfile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1d728a4c..1b448465 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,16 +45,18 @@ pipeline { stage('Deploy') { steps { echo 'Deploying....' - if (env.GIT_BRANCH == 'master' || env.GIT_BRANCH == 'develop') { - sh """ - cd ./jenkins/${ENV:GIT_BRANCH} - docker-compose stop | true - docker-compose up -d - """ - } else { - sh """ - docker push tikazyq/crawlab:${ENV:TAG} - """ + script { + if (env.GIT_BRANCH == 'master' || env.GIT_BRANCH == 'develop') { + sh """ + cd ./jenkins/${ENV:GIT_BRANCH} + docker-compose stop | true + docker-compose up -d + """ + } else { + sh """ + docker push tikazyq/crawlab:${ENV:TAG} + """ + } } } }