1
0
Fork 0

修改Jenkinsfile,在构建时只停止即将运行的image

Lanhui-add-articles
张小飞 2021-06-01 10:53:19 +08:00
parent 8c8866548b
commit 951e05db47
1 changed files with 1 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -18,7 +18,7 @@ pipeline {
steps { steps {
echo 'Building..' echo 'Building..'
sh 'sudo docker build -t englishpalzhangxf .' sh 'sudo docker build -t englishpalzhangxf .'
sh 'sudo docker stop $(docker ps -aq)' sh 'sudo docker stop englishpalzhangxf'
sh 'sudo docker run -d -p 5000:80 -v /var/lib/jenkins/workspace/EnglishPal_Pipeline_master/app/static/frequency:/app/static/frequency -t englishpalzhangxf' sh 'sudo docker run -d -p 5000:80 -v /var/lib/jenkins/workspace/EnglishPal_Pipeline_master/app/static/frequency:/app/static/frequency -t englishpalzhangxf'
} }
} }