add build image main stage

This commit is contained in:
TomPGrid 2025-02-28 14:16:34 +01:00
parent 1242687824
commit 907b313c2c

6
Jenkinsfile vendored
View file

@ -63,9 +63,9 @@ pipeline {
}
steps {
script {
def docker_image=docker.build("main:8085/spring-petclinic:$GIT_COMMIT")
sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" main:8085'
docker.withRegistry('http://main:8085') {
def docker_image=docker.build("main:8083/spring-petclinic:$GIT_COMMIT")
sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" main:8083'
docker.withRegistry('http://main:8083') {
docker_image.push()
}
}