Commit 9222a60f authored by Harald Sitter's avatar Harald Sitter 🦄

fix archiving when install tests fail early

when an install test fails before it reaches the original metadata
retrieval (e.g. broken uefi) the metadata dir may be empty, therefore
we cannot expect it not to be empty.
instead we'll allow empty, do the rest of the post-build archiving and
then explicitly attempt to ls * which should then end in error if sh
cannot expand * to anything.

without this the metadata archival aborts in error and none of the steps
after it are actually reached. also, moving the archival to the end made
similiarly no sense since the steps such as chown may also fail, so we'd
then skip archiving on account of unrelated error. archiving and split
assertion seems the best way really
parent a50bed0f
......@@ -54,10 +54,13 @@ lock(inversePrecedence: true, label: 'OPENQA_INSTALL') {
}
}
} finally {
dir('metadata') { archiveArtifacts '*' }
dir('metadata') { allowEmptyArchive: true, archiveArtifacts '*' }
dir('wok') { archiveArtifacts allowEmptyArchive: true, artifacts: 'testresults/*, ulogs/*, video.*, vars.json, slide.html' }
junit 'junit/*'
sh 'bin/contain.rb chown -R jenkins .'
// Make sure we fail if metadata was empty, we didn't assert this earlier
// because we want the rest of the post-build to run.
sh 'ls metadata/*'
}
}
}
......
......@@ -39,10 +39,13 @@ lock(inversePrecedence: true, label: 'OPENQA_INSTALL') {
}
}
} finally {
dir('metadata') { archiveArtifacts '*' }
dir('metadata') { allowEmptyArchive: true, archiveArtifacts '*' }
dir('wok') { archiveArtifacts allowEmptyArchive: true, artifacts: 'testresults/*, ulogs/*, video.*, vars.json, slide.html' }
junit 'junit/*'
sh 'bin/contain.rb chown -R jenkins .'
// Make sure we fail if metadata was empty, we didn't assert this earlier
// because we want the rest of the post-build to run.
sh 'ls metadata/*'
}
}
}
......
......@@ -38,9 +38,12 @@ lock(inversePrecedence: true, label: 'OPENQA_INSTALL') {
}
}
} finally {
dir('metadata') { archiveArtifacts '*' }
dir('metadata') { allowEmptyArchive: true, archiveArtifacts '*' }
dir('wok') { archiveArtifacts allowEmptyArchive: true, artifacts: 'testresults/*, ulogs/*, video.*, vars.json, slide.html' }
junit 'junit/*'
// Make sure we fail if metadata was empty, we didn't assert this earlier
// because we want the rest of the post-build to run.
sh 'ls metadata/*'
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment