Jenkinsfile: publish test results only one time (#60129)
This commit is contained in:
parent
549515cb86
commit
b9845dbfff
|
@ -7,7 +7,7 @@ pipeline {
|
|||
TMPDIR = "/tmp/${JOB_NAME.take(32)}-${BUILD_NUMBER}"
|
||||
}
|
||||
stages {
|
||||
stage('Unit Tests (main targets)') {
|
||||
stage('Tests (main)') {
|
||||
steps {
|
||||
sh "mkdir -p ${env.TMPDIR}"
|
||||
sh """
|
||||
|
@ -15,19 +15,8 @@ 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)') {
|
||||
stage('Tests (nightly)') {
|
||||
when { triggeredBy 'TimerTrigger' }
|
||||
steps {
|
||||
sh """
|
||||
|
@ -43,17 +32,6 @@ PGPORT=`python3 -c 'import struct; import socket; s=socket.socket(); s.setsockop
|
|||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
utils = new Utils()
|
||||
utils.publish_coverage('coverage.xml')
|
||||
utils.publish_coverage_native('index.html')
|
||||
utils.publish_pylint('pylint.out')
|
||||
}
|
||||
mergeJunitResults()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Packaging') {
|
||||
steps {
|
||||
|
@ -69,10 +47,14 @@ PGPORT=`python3 -c 'import struct; import socket; s=socket.socket(); s.setsockop
|
|||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
utils = new Utils()
|
||||
utils.mail_notify(currentBuild, env, 'ci+jenkins-authentic@entrouvert.org')
|
||||
}
|
||||
script {
|
||||
utils = new Utils()
|
||||
utils.mail_notify(currentBuild, env, 'ci+jenkins-authentic@entrouvert.org')
|
||||
utils.publish_coverage('coverage.xml')
|
||||
utils.publish_coverage_native('index.html')
|
||||
utils.publish_pylint('pylint.out')
|
||||
}
|
||||
mergeJunitResults()
|
||||
}
|
||||
cleanup {
|
||||
sh "rm -rf ${env.TMPDIR}"
|
||||
|
|
Loading…
Reference in New Issue