spring-petclinic/Jenkinsfile

35 lines
679 B
Text
Raw Normal View History

2025-02-26 11:36:50 +01:00
pipeline {
2025-02-27 09:36:21 +01:00
agent {
docker { image 'maven:3.8.5-openjdk-17' }
2025-02-26 11:45:58 +01:00
}
2025-02-27 09:36:21 +01:00
2025-02-26 11:36:50 +01:00
stages {
2025-02-27 13:58:28 +01:00
stage('Checkstyle') {
2025-02-26 11:36:50 +01:00
steps {
2025-02-26 11:45:58 +01:00
checkout scm
sh 'mvn checkstyle:checkstyle'
2025-02-26 11:36:50 +01:00
}
2025-02-27 13:58:28 +01:00
post {
always {
archiveArtifacts artifacts: 'target/checkstyle-result.xml', allowEmptyArchive: true
}
}
}
2025-02-28 10:46:44 +01:00
stage('Test') {
steps {
2025-02-28 10:49:55 +01:00
sh 'mvn test -Dcheckstyle.skip=true'
2025-02-28 10:46:44 +01:00
}
}
2025-02-27 13:58:28 +01:00
stage('Build') {
steps {
2025-02-28 10:40:53 +01:00
sh 'mvn clean package -DskipTests -Dcheckstyle.skip=true'
2025-02-27 13:58:28 +01:00
}
post {
always {
archiveArtifacts artifacts: 'target/*.jar', allowEmptyArchive: true
}
}
2025-02-26 11:36:50 +01:00
}
}
}