Create Allure test reports
This commit is contained in:
parent
740abed621
commit
bcc7f83ef8
3 changed files with 25 additions and 7 deletions
30
Jenkinsfile
vendored
30
Jenkinsfile
vendored
|
@ -46,10 +46,12 @@ pys.each { py ->
|
|||
}
|
||||
}
|
||||
|
||||
archiveArtifacts artifacts: '.tox/dist/*.zip', fingerprint: true
|
||||
if (py.main) {
|
||||
archiveArtifacts artifacts: 'dist/*', fingerprint: true
|
||||
stash includes: 'dist/*.tar.gz', name: 'bin'
|
||||
dir('.tox') {
|
||||
stash includes: 'allure-*/**', name: 'allure'
|
||||
}
|
||||
def buildVer = findFiles(glob: 'dist/*.tar.gz')[0].name.replaceFirst(/\.tar\.gz$/, '')
|
||||
currentBuild.description = buildVer
|
||||
|
||||
|
@ -72,7 +74,12 @@ pys.each { py ->
|
|||
timestamps {
|
||||
ansiColor('xterm') {
|
||||
parallel(tasks)
|
||||
windowsBuild()
|
||||
stage('Windows binary') {
|
||||
windowsBuild()
|
||||
}
|
||||
stage('Allure report') {
|
||||
processAllure()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,11 +93,9 @@ def buildDockerfile(image) {
|
|||
}
|
||||
|
||||
def windowsBuild() {
|
||||
stage('Windows binary') {
|
||||
warnError('windows build failed') {
|
||||
node {
|
||||
windowsBuildCommands()
|
||||
}
|
||||
warnError('windows build failed') {
|
||||
node {
|
||||
windowsBuildCommands()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -115,4 +120,15 @@ def windowsBuildCommands() {
|
|||
}
|
||||
}
|
||||
|
||||
def processAllure() {
|
||||
warnError('allure report failed') {
|
||||
node {
|
||||
deleteDir()
|
||||
unstash 'allure'
|
||||
sh 'docker run --rm -v $PWD:/work tobix/allure-cli generate allure-*'
|
||||
publishHTML reportDir: 'allure-report', reportFiles: 'index.html', reportName: 'Allure Report'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vim: set ft=groovy:
|
||||
|
|
|
@ -57,6 +57,7 @@ bash =
|
|||
css =
|
||||
cssselect
|
||||
dev =
|
||||
allure-pytest
|
||||
flake8
|
||||
flake8-2020;python_version>'3.5'
|
||||
flake8-breakpoint;python_version>'3.5'
|
||||
|
|
1
tox.ini
1
tox.ini
|
@ -5,6 +5,7 @@ envlist = py35, py36, py37, py38, py39, flake8
|
|||
commands =
|
||||
{envbindir}/py.test --tb=short \
|
||||
--junitxml={toxworkdir}/junit-{envname}.xml \
|
||||
--alluredir={toxworkdir}/allure-{envname} \
|
||||
--cov={envsitepackagesdir}/dosagelib \
|
||||
--cov-branch \
|
||||
--cov-config=tox.ini \
|
||||
|
|
Loading…
Reference in a new issue