mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-26 19:15:09 +00:00
Preserve dumpstream on Maven failure (#6641)
This commit is contained in:
1 parent
e036d3af2e
commit
112bb349f7
1 file changed
+7
-4
Vendored
+7
-4
@@ -61,9 +61,13 @@ for (i = 0; i < buildTypes.size(); i++) {
|
||||
'clean',
|
||||
'install',
|
||||
]
|
||||
infra.runMaven(mavenOptions, jdk)
|
||||
if (isUnix()) {
|
||||
sh 'git add . && git diff --exit-code HEAD'
|
||||
try {
|
||||
infra.runMaven(mavenOptions, jdk)
|
||||
if (isUnix()) {
|
||||
sh 'git add . && git diff --exit-code HEAD'
|
||||
}
|
||||
} finally {
|
||||
archiveArtifacts allowEmptyArchive: true, artifacts: '**/target/surefire-reports/*.dumpstream'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +75,6 @@ for (i = 0; i < buildTypes.size(); i++) {
|
||||
|
||||
// Once we've built, archive the artifacts and the test results.
|
||||
stage("${buildType} Publishing") {
|
||||
archiveArtifacts allowEmptyArchive: true, artifacts: '**/target/surefire-reports/*.dumpstream'
|
||||
if (!fileExists('core/target/surefire-reports/TEST-jenkins.Junit4TestsRanTest.xml')) {
|
||||
error 'JUnit 4 tests are no longer being run for the core package'
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user