This commit is contained in:
work 2025-02-05 19:09:25 +01:00
parent 39d9e06a5f
commit 0368d9003c

20
Jenkinsfile vendored
View file

@ -7,8 +7,9 @@ pipeline {
imageName = "spring-pet-clinic"
registryCredentials = "nexus-credentials"
registry = "https://localhost:9081"
registry = "localhost:9081"
dockerImage = ''
DOCKERHUB_CREDENTIALS="piachsecki-dockerhub"
}
tools {
@ -16,15 +17,30 @@ pipeline {
}
stages {
stage ('Docker build') {
steps {
script {
sh '/usr/sbin/envShell.sh build -t spring-pet-clinic .'
sh '/usr/sbin/envShell.sh build -t piachsecki/spring-pet-clinic:latest .'
}
}
}
stage('Login to dockerhub') {
steps {
sh 'echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin'
}
}
stage('Push') {
steps {
sh 'docker push piachsecki/spring-pet-clinic:latest'
}
}
/*stage ('Build') {
steps {
sh './mvnw -B -DskipTests clean package'