From 549515cb86f10a01ba427c1bf955a5a5485cca92 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 24 Jan 2022 15:41:12 +0100 Subject: [PATCH] Jenkinsfile: always publish test results (#60129) --- Jenkinsfile | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1048473e..4367787f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,6 +15,17 @@ python3 -m venv ${env.TMPDIR}/venv/ ${env.TMPDIR}/venv/bin/pip install tox PGPORT=`python3 -c 'import struct; import socket; s=socket.socket(); s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack("ii", 1, 0)); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` pg_virtualenv -o fsync=off ${env.TMPDIR}/venv/bin/tox -rv""" } + post { + always { + script { + utils = new Utils() + utils.publish_coverage('coverage.xml') + utils.publish_coverage_native('index.html') + utils.publish_pylint('pylint.out') + } + mergeJunitResults() + } + } } stage('Unit Tests (nightly)') { when { triggeredBy 'TimerTrigger' } @@ -32,17 +43,17 @@ PGPORT=`python3 -c 'import struct; import socket; s=socket.socket(); s.setsockop } } } - } - stage('Publish') { - steps { - script { - utils = new Utils() - utils.publish_coverage('coverage.xml') - utils.publish_coverage_native('index.html') - utils.publish_pylint('pylint.out') + post { + always { + script { + utils = new Utils() + utils.publish_coverage('coverage.xml') + utils.publish_coverage_native('index.html') + utils.publish_pylint('pylint.out') + } + mergeJunitResults() + } } - mergeJunitResults() - } } stage('Packaging') { steps { -- 2.34.1