mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 16:25:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
754799a259
commit
f111398d8a
1 changed files with 3 additions and 19 deletions
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
|
@ -1,28 +1,12 @@
|
|||
#!groovy
|
||||
|
||||
pipeline {
|
||||
agent none stages {
|
||||
agent none
|
||||
stages {
|
||||
stage('Maven Install') {
|
||||
agent any
|
||||
|
||||
agent any
|
||||
steps {
|
||||
sh 'mvn clean install'
|
||||
}
|
||||
}
|
||||
stage('Docker Build') {
|
||||
agent any
|
||||
steps {
|
||||
sh 'docker build -t registry.hub.docker.com/hybrid2k3/petclinic:1 .'
|
||||
}
|
||||
}
|
||||
stage('Docker Push') {
|
||||
agent any
|
||||
steps {
|
||||
withCredentials([usernamePassword(credentialsId: 'dockerHub', passwordVariable: 'dockerHubPassword', usernameVariable: 'dockerHubUser')]) {
|
||||
sh "docker login -u ${env.dockerHubUser} -p ${env.dockerHubPassword}"
|
||||
sh 'registry.hub.docker.com/hybrid2k3/petclinic:1'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue