mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-05-28 13:59: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"
|
||||
|
||||
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'
|
||||
|
|
Loading…
Reference in a new issue