dosage/tests/modules/Jenkinsfile

38 lines
1.3 KiB
Text
Raw Normal View History

#!groovy
2022-05-27 23:19:19 +00:00
node {
stage('Checkout') {
deleteDir()
checkout scm
}
stage ('Run tests') {
timeout(time: 12, unit: 'HOURS') {
withCredentials([string(credentialsId: 'proxymap', variable: 'PROXYMAP')]) {
2022-05-27 23:19:19 +00:00
sh 'podman run --rm -v $PWD:/work --userns=keep-id docker.io/python:3.10-bullseye tests/modules/testall.sh'
}
}
}
2022-05-27 23:19:19 +00:00
stage('Report') {
junit 'junit.xml'
publishCoverage calculateDiffForChangeRequests: true,
sourceFileResolver: sourceFiles('STORE_LAST_BUILD'),
adapters: [
coberturaAdapter('coverage.xml')
]
}
2020-11-23 00:18:17 +00:00
stage('Allure Report') {
copyArtifacts filter: 'allure-history.zip', optional: true,
projectName: JOB_NAME, selector: lastWithArtifacts()
if (fileExists('allure-history.zip')) {
unzip dir: 'allure-data', quiet: true, zipFile: 'allure-history.zip'
sh 'rm -f allure-history.zip'
2020-11-23 00:18:17 +00:00
}
2022-05-27 23:19:19 +00:00
sh 'podman run --rm -v $PWD:/work --userns=keep-id docker.io/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'
}
}