mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 23:05:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
afb55121bb
commit
ce77562a4e
1 changed files with 7 additions and 4 deletions
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
|
@ -1,10 +1,13 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
tools {
|
||||||
|
maven 'Maven 3' // Global Tool Configuration
|
||||||
|
}
|
||||||
environment {
|
environment {
|
||||||
DOCKERHUB_USERNAME = credentials('dockerhub')
|
DOCKERHUB_USERNAME = credentials('dockerhub')
|
||||||
DOCKERHUB_PASSWORD = credentials('dockerhub')
|
DOCKERHUB_PASSWORD = credentials('dockerhub')
|
||||||
DOCKER_IMAGE_MR = "marijastopa/mr-jenkins"
|
DOCKER_IMAGE_MR = "marijastopa/mr-jenkins"
|
||||||
DOCKER_IMAGE_MAIN = "marijastopa/main-jenkins"
|
DOCKER_IMAGE_MAIN = "marijastopa/main-jenkins"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Checkstyle') {
|
stage('Checkstyle') {
|
||||||
|
@ -28,7 +31,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Build and Push Docker Image (Merge Request)') {
|
stage('Build and Push Docker Image (Merge Request)') {
|
||||||
when {
|
when {
|
||||||
branch 'develop'
|
branch 'develop'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
@ -42,7 +45,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Build and Push Docker Image (Main)') {
|
stage('Build and Push Docker Image (Main)') {
|
||||||
when {
|
when {
|
||||||
branch 'main'
|
branch 'main'
|
||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
|
|
Loading…
Reference in a new issue