From 0c93e6a1903358b3ce3a37427cdfc528a0762fe7 Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Sat, 24 Aug 2019 17:28:23 +0800 Subject: [PATCH] updated Jenkinsfile --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 162200393..b7441beaa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -48,8 +48,11 @@ pipeline { sh """ # 重启docker compose cd ./jenkins/${ENV:GIT_BRANCH} - docker-compose stop | true - docker-compose up -d + docker-compose stop master | true + docker-compose rm -f master | true + docker-compose stop worker | true + docker-compose rm -f worker | true + docker-compose up -d | true """ } } @@ -57,7 +60,7 @@ pipeline { steps { echo 'Cleanup...' sh """ - docker rmi `docker images | grep '' | grep -v IMAGE | awk '{ print \$3 }' | xargs` + docker rmi -f `docker images | grep '' | grep -v IMAGE | awk '{ print \$3 }' | xargs` """ } }