mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 06:45:49 +00:00
Fixing jenkisfile
This commit is contained in:
parent
60cc11f9a2
commit
1e4ed072bc
1 changed files with 14 additions and 5 deletions
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
|
@ -28,12 +28,21 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Build Container') {
|
||||||
|
steps {
|
||||||
|
echo 'Building..'
|
||||||
|
sh 'docker rmi --force "natyramone/pet-clinic"'
|
||||||
|
sh 'docker build -t pet-clinic .'
|
||||||
|
sh 'docker tag pet-clinic $DOCKER_USER/pet-clinic:latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
stage('Run local container') {
|
stage('Run local container') {
|
||||||
agent any
|
agent any
|
||||||
steps {
|
steps {
|
||||||
sh 'docker rm -f natyramone/pet-clinic:latest || true'
|
sh 'docker rm -f pet-clinic || true'
|
||||||
sh 'docker run -d -p 8081:8080 natyramone/pet-clinic:latest'
|
sh 'docker run -d -p 8081:8080 --name pet-clinic natyramone/pet-clinic:latest'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue