mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-25 00:25:50 +00:00
Update Jenkinsfile
This commit is contained in:
parent
13ddc95aa0
commit
2c3861472a
1 changed files with 2 additions and 5 deletions
7
Jenkinsfile
vendored
7
Jenkinsfile
vendored
|
@ -18,10 +18,6 @@ pipeline {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Running build automation'
|
echo 'Running build automation'
|
||||||
echo '${env.IMAGE_BASE}'
|
|
||||||
echo '${env.IMAGE_TAG}'
|
|
||||||
echo '${env.IMAGE_NAME}'
|
|
||||||
echo '${env.IMAGE_NAME_LATEST}'
|
|
||||||
sh '''
|
sh '''
|
||||||
./mvnw package
|
./mvnw package
|
||||||
'''
|
'''
|
||||||
|
@ -30,7 +26,7 @@ pipeline {
|
||||||
stage('CREATE ARTIFACT') {
|
stage('CREATE ARTIFACT') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Creating Docker Image...'
|
echo 'Creating Docker Image...'
|
||||||
sh '''
|
sh '''#!/bin/bash -xe
|
||||||
docker build . -t ${env.IMAGE_NAME} -f ${env.DOCKERFILE_NAME}
|
docker build . -t ${env.IMAGE_NAME} -f ${env.DOCKERFILE_NAME}
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
@ -38,6 +34,7 @@ pipeline {
|
||||||
stage('Push artifact to docker registry') {
|
stage('Push artifact to docker registry') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
#!/bin/bash -xe
|
||||||
docker.withRegistry('', 'dockerhub_id') {
|
docker.withRegistry('', 'dockerhub_id') {
|
||||||
dockerImage.push()
|
dockerImage.push()
|
||||||
dockerImage.push("latest")
|
dockerImage.push("latest")
|
||||||
|
|
Loading…
Reference in a new issue