adding artifactory steps

This commit is contained in:
Maharshi Patel 2021-01-10 14:08:36 -08:00
parent 491c917a95
commit b2573716b1

13
Jenkinsfile vendored
View file

@ -22,19 +22,24 @@ pipeline {
// START : Stages
/////////////////////////////////////////////////////////////////////
stages {
stage('build package') {
stage('build maven package') {
steps {
sh 'mvn validate compile test'
rtServer (
id: "ARTIFACTORY_SERVER",
url: $artifactory_url,
credentialsId: CREDENTIALS
)
sh 'mvn validate compile test package'
}
}
stage('build image') {
stage('build docker image') {
steps {
script {
dockerImage = docker.build "mpatel011/spring-petclinic:$BUILD_NUMBER"
}
}
}
stage('deploy image') {
stage('push docker image') {
steps {
script {
docker.withRegistry('' , 'dockerhub') {