2022-08-26 11:50:53 +02:00
|
|
|
pipeline {
|
|
|
|
|
|
|
|
environment {
|
|
|
|
TOX_PARALLEL_NO_SPINNER = "1"
|
|
|
|
PY_COLORS = "0"
|
|
|
|
}
|
|
|
|
|
|
|
|
agent any
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Prepare') {
|
|
|
|
steps {
|
|
|
|
sh 'poetry install'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Tox') {
|
|
|
|
matrix {
|
|
|
|
axes {
|
|
|
|
axis {
|
|
|
|
name 'PYTHON_VERSION'
|
|
|
|
values 'py38', 'py39', 'py310'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Tox Test') {
|
|
|
|
options {
|
|
|
|
lock('single-tox-build')
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
sh 'poetry run tox -r -e ${PYTHON_VERSION}'
|
2022-08-26 11:55:56 +02:00
|
|
|
xunit checksName: "Tests ${PYTHON_VERSION}", tools: [JUnit(excludesPattern: '', pattern: 'test-reports/*.xml', stopProcessingIfError: true)]
|
2022-08-26 11:50:53 +02:00
|
|
|
cobertura autoUpdateStability: false, coberturaReportFile: 'coverage.xml', conditionalCoverageTargets: '70, 0, 0', failUnhealthy: false, failUnstable: false, lineCoverageTargets: '80, 0, 0', maxNumberOfBuilds: 0, methodCoverageTargets: '80, 0, 0', onlyStable: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
success {
|
2022-08-26 12:39:45 +02:00
|
|
|
deleteDir()
|
2022-08-26 11:50:53 +02:00
|
|
|
}
|
|
|
|
always {
|
|
|
|
withCredentials([string(credentialsId: 'jed-notification-email', variable: 'EMAIL')]) {
|
|
|
|
mail to: "${EMAIL}",
|
2022-08-26 12:40:43 +02:00
|
|
|
subject: "[${currentBuild.fullDisplayName}] Build #${currentBuild.number}: ${currentBuild.currentResult}",
|
2022-08-26 12:39:45 +02:00
|
|
|
body: "Duration: ${currentBuild.durationString} / Jenkins URL: ${env.BUILD_URL}"
|
2022-08-26 11:50:53 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|