Keep allure history over unstable builds

This commit is contained in:
Tobias Gruetzmacher 2021-01-19 08:37:29 +01:00
parent 9c87c214b6
commit 5b3bfdd09e
2 changed files with 2 additions and 2 deletions

2
Jenkinsfile vendored
View file

@ -127,7 +127,7 @@ def processAllure() {
deleteDir() deleteDir()
unstash 'allure' unstash 'allure'
sh 'mv allure-* allure-data' sh 'mv allure-* allure-data'
copyArtifacts filter: 'allure-history.zip', optional: true, projectName: JOB_NAME copyArtifacts filter: 'allure-history.zip', optional: true, projectName: JOB_NAME, selector: lastWithArtifacts()
if (fileExists('allure-history.zip')) { if (fileExists('allure-history.zip')) {
unzip dir: 'allure-data', quiet: true, zipFile: 'allure-history.zip' unzip dir: 'allure-data', quiet: true, zipFile: 'allure-history.zip'
sh 'rm -f allure-history.zip' sh 'rm -f allure-history.zip'

View file

@ -53,7 +53,7 @@ ansiColor('xterm') {
} }
stage('Allure Report') { stage('Allure Report') {
copyArtifacts filter: 'allure-history.zip', optional: true, projectName: JOB_NAME copyArtifacts filter: 'allure-history.zip', optional: true, projectName: JOB_NAME, selector: lastWithArtifacts()
if (fileExists('allure-history.zip')) { if (fileExists('allure-history.zip')) {
unzip dir: 'allure-data', quiet: true, zipFile: 'allure-history.zip' unzip dir: 'allure-data', quiet: true, zipFile: 'allure-history.zip'
sh 'rm -f allure-history.zip' sh 'rm -f allure-history.zip'