mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 07:15:49 +00:00
Jenkins: Simplifies pipeline
This commit is contained in:
parent
79b6805639
commit
cd65c32c2e
1 changed files with 3 additions and 8 deletions
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
|
@ -9,8 +9,8 @@ properties([
|
||||||
|
|
||||||
node {
|
node {
|
||||||
|
|
||||||
cesFqdn = findHostName()
|
String cesFqdn = findHostName()
|
||||||
cesUrl = "https://${cesFqdn}"
|
String cesUrl = "https://${cesFqdn}"
|
||||||
String credentialsId = 'scmCredentials'
|
String credentialsId = 'scmCredentials'
|
||||||
|
|
||||||
Maven mvn = new MavenWrapper(this)
|
Maven mvn = new MavenWrapper(this)
|
||||||
|
@ -28,16 +28,15 @@ node {
|
||||||
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
|
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String jacoco = "org.jacoco:jacoco-maven-plugin:0.8.1"
|
||||||
parallel(
|
parallel(
|
||||||
test: {
|
test: {
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
String jacoco = "org.jacoco:jacoco-maven-plugin:0.7.7.201606060606"
|
|
||||||
mvn "${jacoco}:prepare-agent test ${jacoco}:report"
|
mvn "${jacoco}:prepare-agent test ${jacoco}:report"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
integrationTest: {
|
integrationTest: {
|
||||||
stage('Integration Test') {
|
stage('Integration Test') {
|
||||||
String jacoco = "org.jacoco:jacoco-maven-plugin:0.7.7.201606060606";
|
|
||||||
mvn "${jacoco}:prepare-agent-integration failsafe:integration-test ${jacoco}:report-integration"
|
mvn "${jacoco}:prepare-agent-integration failsafe:integration-test ${jacoco}:report-integration"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +61,3 @@ node {
|
||||||
// Archive Unit and integration test results, if any
|
// Archive Unit and integration test results, if any
|
||||||
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml,**/target/surefire-reports/TEST-*.xml'
|
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml,**/target/surefire-reports/TEST-*.xml'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init global vars in order to avoid NPE
|
|
||||||
String cesFqdn = ''
|
|
||||||
String cesUrl = ''
|
|
||||||
|
|
Loading…
Reference in a new issue