2020-01-10 12:02:45 +00:00
|
|
|
#!groovy
|
|
|
|
|
2022-05-27 23:19:19 +00:00
|
|
|
node {
|
|
|
|
stage('Checkout') {
|
|
|
|
deleteDir()
|
|
|
|
checkout scm
|
2020-01-10 12:02:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stage ('Run tests') {
|
2021-03-19 13:16:04 +00:00
|
|
|
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'
|
2021-03-19 13:16:04 +00:00
|
|
|
}
|
2020-09-28 23:50:02 +00:00
|
|
|
}
|
2020-01-10 12:02:45 +00:00
|
|
|
}
|
2022-05-27 23:19:19 +00:00
|
|
|
|
2020-01-10 12:02:45 +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
|
|
|
|
2021-03-19 13:27:56 +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'
|
2021-03-19 13:27:56 +00:00
|
|
|
zip archive: true, dir: 'allure-report', glob: 'history/**', zipFile: 'allure-history.zip'
|
|
|
|
publishHTML reportDir: 'allure-report', reportFiles: 'index.html', reportName: 'Allure Report'
|
2020-01-10 12:02:45 +00:00
|
|
|
}
|
|
|
|
}
|