mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 15:25:49 +00:00
Jenkins: Archive JUnit results also on failing tests
This commit is contained in:
parent
e92ae405dd
commit
ef3e3defd4
1 changed files with 60 additions and 60 deletions
24
Jenkinsfile
vendored
24
Jenkinsfile
vendored
|
@ -1,9 +1,11 @@
|
||||||
#!groovy
|
#!groovy
|
||||||
node {
|
node {
|
||||||
|
|
||||||
cesFqdn = "ecosystem.cloudogu.net";
|
cesFqdn = "ecosystem.cloudogu.net"
|
||||||
cesUrl = "https://${cesFqdn}";
|
cesUrl = "https://${cesFqdn}"
|
||||||
credentials = usernamePassword(credentialsId: 'scmCredentials', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME');
|
credentials = usernamePassword(credentialsId: 'scmCredentials', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')
|
||||||
|
|
||||||
|
catchError {
|
||||||
|
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
@ -21,18 +23,12 @@ node {
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
String jacoco = "org.jacoco:jacoco-maven-plugin:0.7.7.201606060606";
|
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"
|
||||||
|
|
||||||
// Archive JUnit results, if any
|
|
||||||
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
integrationTest: {
|
integrationTest: {
|
||||||
stage('Integration Test') {
|
stage('Integration Test') {
|
||||||
String jacoco = "org.jacoco:jacoco-maven-plugin:0.7.7.201606060606";
|
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"
|
||||||
|
|
||||||
// Archive JUnit results, if any
|
|
||||||
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -60,11 +56,15 @@ node {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Archive Unit and integration test results, if any
|
||||||
|
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml,**/target/surefire-reports/TEST-*.xml'
|
||||||
}
|
}
|
||||||
|
|
||||||
String cesFqdn;
|
String cesFqdn
|
||||||
String cesUrl;
|
String cesUrl
|
||||||
def credentials;
|
def credentials
|
||||||
|
|
||||||
void mvn(String args) {
|
void mvn(String args) {
|
||||||
writeSettingsXml()
|
writeSettingsXml()
|
||||||
|
|
Loading…
Reference in a new issue