Skip to content

Commit

Permalink
conntest+main pipeline will now fail on test config fail
Browse files Browse the repository at this point in the history
  • Loading branch information
virgo47 committed Mar 28, 2023
1 parent 9263d28 commit a5b9dd8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions tools/jenkins/midpoint-conntest-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ podTemplate(
"""
currentBuild.result = 'SUCCESS'

step([$class: 'Publisher', reportFilenamePattern: '**/testng-results.xml'])
step([$class: 'Publisher',
reportFilenamePattern: '**/testng-results.xml',
failureOnFailedTestConfig: true // TODO we don't want failure, but how can we make it unstable?
])

if (currentBuild.result == 'UNSTABLE' || params.ARCHIVE_LOGS) {
if (currentBuild.result == 'UNSTABLE' || currentBuild.result == 'FAILURE' || params.ARCHIVE_LOGS) {
sh "tar --transform \"s-.*/--g\" -cvzf conntest-log.tgz testing/conntest/target/test.log"
archiveArtifacts allowEmptyArchive: true, artifacts: "conntest-log.tgz", followSymlinks: false
}
Expand Down
4 changes: 2 additions & 2 deletions tools/jenkins/midpoint-main-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ podTemplate(
// Using this step in each phase produces multiple graphs, but all have the same results from the last run.
step([$class: 'Publisher',
reportFilenamePattern: '**/testng-results.xml',
// failureOnFailedTestConfig: true // TODO we don't want failure, but how can we make it unstable?
failureOnFailedTestConfig: true // TODO we don't want failure, but how can we make it unstable?
])

if (currentBuild.result == 'UNSTABLE' || params.ARCHIVE_LOGS) {
if (currentBuild.result == 'UNSTABLE' || currentBuild.result == 'FAILURE' || params.ARCHIVE_LOGS) {
sh "find . -wholename '*/target/test.log' -print0 | tar -czf test-logs.tgz --null -T -"
archiveArtifacts allowEmptyArchive: true, artifacts: "test-logs.tgz", followSymlinks: false
}
Expand Down

0 comments on commit a5b9dd8

Please sign in to comment.