Jenkins: Cache allure history between job runs
This commit is contained in:
parent
0ac2f560a4
commit
0ea45ce986
2 changed files with 13 additions and 2 deletions
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
|
@ -125,7 +125,13 @@ def processAllure() {
|
|||
node {
|
||||
deleteDir()
|
||||
unstash 'allure'
|
||||
sh 'docker run --rm -v $PWD:/work -u $(id -u) tobix/allure-cli generate allure-*'
|
||||
sh 'mv allure-* allure-data'
|
||||
copyArtifacts filter: 'allure-history.zip', optional: true, projectName: JOB_NAME
|
||||
if (fileExists('allure-history.zip')) {
|
||||
unzip dir: 'allure-data', quiet: true, zipFile: 'allure-history.zip'
|
||||
sh 'rm -f allure-history.zip'
|
||||
}
|
||||
sh 'docker run --rm -v $PWD:/work -u $(id -u) tobix/allure-cli generate allure-data'
|
||||
zip archive: true, dir: 'allure-report', glob: 'history/**', zipFile: 'allure-history.zip'
|
||||
publishHTML reportDir: 'allure-report', reportFiles: 'index.html', reportName: 'Allure Report'
|
||||
}
|
||||
|
|
7
tests/modules/Jenkinsfile
vendored
7
tests/modules/Jenkinsfile
vendored
|
@ -53,8 +53,13 @@ ansiColor('xterm') {
|
|||
}
|
||||
|
||||
stage('Allure Report') {
|
||||
copyArtifacts filter: 'allure-history.zip', optional: true, projectName: JOB_NAME
|
||||
if (fileExists('allure-history.zip')) {
|
||||
unzip dir: 'allure-data', quiet: true, zipFile: 'allure-history.zip'
|
||||
sh 'rm -f allure-history.zip'
|
||||
}
|
||||
sh 'docker run --rm -v $PWD:/work -u $(id -u) tobix/allure-cli generate allure-data'
|
||||
zip archive: true, dir: 'allure-report', glob: 'history/**', overwrite: true, zipFile: 'allure-history.zip'
|
||||
zip archive: true, dir: 'allure-report', glob: 'history/**', zipFile: 'allure-history.zip'
|
||||
publishHTML reportDir: 'allure-report', reportFiles: 'index.html', reportName: 'Allure Report'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue