mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:25:49 +00:00
Updated jenkinsfile
This commit is contained in:
parent
88530113e8
commit
fea262e763
1 changed files with 26 additions and 2 deletions
28
Jenkinsfile
vendored
28
Jenkinsfile
vendored
|
@ -2,15 +2,39 @@ pipeline {
|
|||
agent {
|
||||
label 'dockerbuild'
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// START :
|
||||
// Definition of Jenkins job configuration
|
||||
// Job Parameters and any other config is set here, not in Jenkins UI
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
options {
|
||||
disableConcurrentBuilds()//Do NOT run in parallel!
|
||||
buildDiscarder(logRotator(numToKeepStr: '50'))
|
||||
timeout(time: 120, unit: 'MINUTES')
|
||||
skipStagesAfterUnstable()
|
||||
timestamps()
|
||||
}
|
||||
environment {
|
||||
artifactory_url="https://petclinic.jfrog.io/artifactory"
|
||||
artifactory_repo="spring-petclinic"
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// END
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// START : Stages
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
stages {
|
||||
stage('Building our image') {
|
||||
stage('build image') {
|
||||
steps {
|
||||
script {
|
||||
dockerImage = docker.build "mpatel011/spring-petclinic:$BUILD_NUMBER"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Deploy our image') {
|
||||
stage('deploy image') {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry('' , 'dockerhub') {
|
||||
|
|
Loading…
Reference in a new issue