Update Jenkinsfile add docker stop if

This commit is contained in:
Kirill 2024-06-11 15:10:58 +03:00 committed by GitHub
parent 647ce41156
commit a890d5096a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

3
Jenkinsfile vendored
View file

@ -28,6 +28,9 @@ pipeline {
steps {
sh '''
docker pull kerallenarium/spring-petclinic:latest
if [ "$(docker ps -q)" ]; then
docker stop $(docker ps -q)
fi
docker run -d -p 80:8080 kerallenarium/spring-petclinic:latest
'''
}