This commit is contained in:
work 2025-02-05 19:29:14 +01:00
parent a8c071688c
commit a8cef50b50

13
Jenkinsfile vendored
View file

@ -28,15 +28,16 @@ pipeline {
}
}
stage('Login to dockerhub') {
stage('Login to dockerhub') {
steps {
docker.withRegistry('https://index.docker.io/v1/', 'piachsecki-dockerhub') {
echo 'Logged into DockerHub'
withCredentials([usernamePassword(credentialsId: 'piachsecki-dockerhub',
usernameVariable: 'DOCKERHUB_USER',
passwordVariable: 'DOCKERHUB_PASS')]) {
sh 'echo $DOCKERHUB_PASS | docker login -u $DOCKERHUB_USER --password-stdin'
}
}
}
}
}
stage('Push') {
steps {
sh 'docker push piachsecki/spring-pet-clinic:latest'