mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:35:49 +00:00
add build image main stage
This commit is contained in:
parent
730a0f69f0
commit
d94209914a
1 changed files with 17 additions and 0 deletions
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
|
@ -54,5 +54,22 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
stage('Build Image Main') {
|
||||
agent {
|
||||
docker {
|
||||
image 'docker:20.10.16'
|
||||
args '--privileged -u root -v /var/run/docker.sock:/var/run/docker.sock'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
script {
|
||||
def docker_image=docker.build("main:8084/spring-petclinic:$GIT_COMMIT")
|
||||
sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" main:8084'
|
||||
docker.withRegistry('http://main:8084') {
|
||||
docker_image.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue