Update Jenkinsfile

This commit is contained in:
senatorovv 2023-07-12 12:26:44 +04:00 committed by GitHub
parent 32e9bce2e5
commit 31824422a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
Jenkinsfile vendored
View file

@ -9,14 +9,14 @@ pipeline {
}
stage('Docker Build') {
steps {
sh 'docker build -t shanem/spring-petclinic:latest .'
sh 'docker build -t registry.hub.docker.com/hybrid2k3/petclinic:1 .'
}
}
stage('Docker Push') {
steps {
withCredentials([usernamePassword(credentialsId: 'dockerHub', passwordVariable: 'dockerHubPassword', usernameVariable: 'dockerHubUser')]) {
sh "docker login -u ${env.dockerHubUser} -p ${env.dockerHubPassword}"
sh 'docker push shanem/spring-petclinic:latest'
sh 'docker push registry.hub.docker.com/hybrid2k3/petclinic:1'
}
}
}