add build image

This commit is contained in:
TomPGrid 2025-02-28 11:19:14 +01:00
parent a0807d5f3a
commit 2ba17ecb45

11
Jenkinsfile vendored
View file

@ -30,5 +30,16 @@ pipeline {
}
}
}
stage('Build Image') {
agent {
image 'docker:20.10.16'
args '--privileged -v /var/ryn/docker.sock:/var/run/docker.sock'
}
steps {
sh 'docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS" mr:8084'
sh 'docker build -t mr:8084/spring-petclinic:$GITCOMMIT .'
sh 'docker push mr:8084/spring-petclinic:$GITCOMMIT'
}
}
}
}