mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-29 14:29:37 +00:00
asda
This commit is contained in:
parent
39d9e06a5f
commit
0368d9003c
1 changed files with 18 additions and 2 deletions
20
Jenkinsfile
vendored
20
Jenkinsfile
vendored
|
@ -7,8 +7,9 @@ pipeline {
|
||||||
imageName = "spring-pet-clinic"
|
imageName = "spring-pet-clinic"
|
||||||
|
|
||||||
registryCredentials = "nexus-credentials"
|
registryCredentials = "nexus-credentials"
|
||||||
registry = "https://localhost:9081"
|
registry = "localhost:9081"
|
||||||
dockerImage = ''
|
dockerImage = ''
|
||||||
|
DOCKERHUB_CREDENTIALS="piachsecki-dockerhub"
|
||||||
}
|
}
|
||||||
|
|
||||||
tools {
|
tools {
|
||||||
|
@ -16,15 +17,30 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
|
||||||
|
|
||||||
stage ('Docker build') {
|
stage ('Docker build') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
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') {
|
/*stage ('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh './mvnw -B -DskipTests clean package'
|
sh './mvnw -B -DskipTests clean package'
|
||||||
|
|
Loading…
Reference in a new issue