From 30db5120f189c2240525f0af4d85ec61ebb43086 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Mon, 23 Nov 2020 01:18:17 +0100 Subject: [PATCH] Add allure report for module tests --- tests/modules/Jenkinsfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/modules/Jenkinsfile b/tests/modules/Jenkinsfile index f9a3eb88a..e52d70351 100644 --- a/tests/modules/Jenkinsfile +++ b/tests/modules/Jenkinsfile @@ -23,7 +23,12 @@ def runTests() { } stage ('Run tests') { withCredentials([string(credentialsId: 'proxymap', variable: 'PROXYMAP')]) { - sh "TESTALL=1 py.test -v --cov=dosagelib --cov-report xml --tb=short -n10 --junitxml=junit.xml tests/modules/check_comics.py || true" + sh ''' + TESTALL=1 py.test -v --cov=dosagelib --cov-report xml \ + --alluredir=allure-data \ + --tb=short -n10 --junitxml=junit.xml \ + tests/modules/check_comics.py || true + ''' } } stage('Report') { @@ -43,6 +48,11 @@ ansiColor('xterm') { img.inside { runTests() } + + stage('Allure Report') { + sh 'docker run --rm -v $PWD:/work tobix/allure-cli generate allure-data' + publishHTML reportDir: 'allure-report', reportFiles: 'index.html', reportName: 'Allure Report' + } } }