Skip to content

Commit

Permalink
updated Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Zhang committed Aug 24, 2019
1 parent e43b765 commit 0c93e6a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,19 @@ 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
"""
}
}
stage('Cleanup') {
steps {
echo 'Cleanup...'
sh """
docker rmi `docker images | grep '<none>' | grep -v IMAGE | awk '{ print \$3 }' | xargs`
docker rmi -f `docker images | grep '<none>' | grep -v IMAGE | awk '{ print \$3 }' | xargs`
"""
}
}
Expand Down

0 comments on commit 0c93e6a

Please sign in to comment.