mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:45:49 +00:00
update maven exe in jenkinsfile
This commit is contained in:
parent
bbe79bef70
commit
47e7a0eccd
1 changed files with 5 additions and 5 deletions
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
|
@ -3,7 +3,7 @@ pipeline {
|
||||||
stages {
|
stages {
|
||||||
stage('Checkstyle') {
|
stage('Checkstyle') {
|
||||||
steps {
|
steps {
|
||||||
sh 'mvn checkstyle:checkstyle'
|
sh './mvnw checkstyle:checkstyle'
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
|
@ -13,20 +13,20 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
steps {
|
steps {
|
||||||
sh 'mvn test'
|
sh './mvnw test'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build Without Tests') {
|
stage('Build Without Tests') {
|
||||||
steps {
|
steps {
|
||||||
sh 'mvn clean package -DskipTests'
|
sh './mvnw clean package -DskipTests'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Create Docker Image and Push') {
|
stage('Create Docker Image and Push') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
def commitId = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
|
def commitId = sh(script: 'git rev-parse --short HEAD', returnStdout: true).trim()
|
||||||
sh "docker build -t your-docker-hub-username/spring-petclinic:${commitId} ."
|
sh "docker build -t mivancevic/spring-petclinic:${commitId} ."
|
||||||
sh "docker push your-docker-hub-username/spring-petclinic:${commitId}"
|
sh "docker push mivancevic/spring-petclinic:${commitId}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue