Create Allure test reports
This commit is contained in:
parent
740abed621
commit
bcc7f83ef8
3 changed files with 25 additions and 7 deletions
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
|
@ -46,10 +46,12 @@ pys.each { py ->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
archiveArtifacts artifacts: '.tox/dist/*.zip', fingerprint: true
|
|
||||||
if (py.main) {
|
if (py.main) {
|
||||||
archiveArtifacts artifacts: 'dist/*', fingerprint: true
|
archiveArtifacts artifacts: 'dist/*', fingerprint: true
|
||||||
stash includes: 'dist/*.tar.gz', name: 'bin'
|
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$/, '')
|
def buildVer = findFiles(glob: 'dist/*.tar.gz')[0].name.replaceFirst(/\.tar\.gz$/, '')
|
||||||
currentBuild.description = buildVer
|
currentBuild.description = buildVer
|
||||||
|
|
||||||
|
@ -72,8 +74,13 @@ pys.each { py ->
|
||||||
timestamps {
|
timestamps {
|
||||||
ansiColor('xterm') {
|
ansiColor('xterm') {
|
||||||
parallel(tasks)
|
parallel(tasks)
|
||||||
|
stage('Windows binary') {
|
||||||
windowsBuild()
|
windowsBuild()
|
||||||
}
|
}
|
||||||
|
stage('Allure report') {
|
||||||
|
processAllure()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildDockerfile(image) {
|
def buildDockerfile(image) {
|
||||||
|
@ -86,14 +93,12 @@ def buildDockerfile(image) {
|
||||||
}
|
}
|
||||||
|
|
||||||
def windowsBuild() {
|
def windowsBuild() {
|
||||||
stage('Windows binary') {
|
|
||||||
warnError('windows build failed') {
|
warnError('windows build failed') {
|
||||||
node {
|
node {
|
||||||
windowsBuildCommands()
|
windowsBuildCommands()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
def windowsBuildCommands() {
|
def windowsBuildCommands() {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
|
@ -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:
|
// vim: set ft=groovy:
|
||||||
|
|
|
@ -57,6 +57,7 @@ bash =
|
||||||
css =
|
css =
|
||||||
cssselect
|
cssselect
|
||||||
dev =
|
dev =
|
||||||
|
allure-pytest
|
||||||
flake8
|
flake8
|
||||||
flake8-2020;python_version>'3.5'
|
flake8-2020;python_version>'3.5'
|
||||||
flake8-breakpoint;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 =
|
commands =
|
||||||
{envbindir}/py.test --tb=short \
|
{envbindir}/py.test --tb=short \
|
||||||
--junitxml={toxworkdir}/junit-{envname}.xml \
|
--junitxml={toxworkdir}/junit-{envname}.xml \
|
||||||
|
--alluredir={toxworkdir}/allure-{envname} \
|
||||||
--cov={envsitepackagesdir}/dosagelib \
|
--cov={envsitepackagesdir}/dosagelib \
|
||||||
--cov-branch \
|
--cov-branch \
|
||||||
--cov-config=tox.ini \
|
--cov-config=tox.ini \
|
||||||
|
|
Loading…
Reference in a new issue