mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 06:45:49 +00:00
adding deployment step to jenkisfile
This commit is contained in:
parent
623a2b4e96
commit
d39d496a42
1 changed files with 17 additions and 0 deletions
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
|
@ -22,6 +22,23 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
stage('Run local container') {
|
||||||
|
agent any
|
||||||
|
steps {
|
||||||
|
sh 'docker rm -f natyramone/pet-clinic:latest || true'
|
||||||
|
sh 'docker run -d -p 8081:8080 natyramone/pet-clinic:latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Push to dockerhub') {
|
||||||
|
agent any
|
||||||
|
steps {
|
||||||
|
sh 'docker push $DOCKER_USER/pet-clinic:latest'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue