Commit f9ab9ca1 authored by Raphael Defosseux's avatar Raphael Defosseux

chore(ci): the failing test-case bullet will directly point to the HTML report

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 06e63f7c
...@@ -32,7 +32,7 @@ def do5Gtest = false ...@@ -32,7 +32,7 @@ def do5Gtest = false
def gitCommitAuthorEmailAddr def gitCommitAuthorEmailAddr
// list of failing stages // list of failing stages
def failingStages = '' def failingStages = ""
pipeline { pipeline {
agent { agent {
...@@ -133,13 +133,13 @@ pipeline { ...@@ -133,13 +133,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-Ubuntu18-Image-Builder') testBullet = finalizeSlaveJob('RAN-Ubuntu18-Image-Builder')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-Ubuntu18-Image-Builder' failingStages += testBullet
} }
} }
} }
...@@ -153,13 +153,13 @@ pipeline { ...@@ -153,13 +153,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-RHEL8-Cluster-Image-Builder') testBullet = finalizeSlaveJob('RAN-RHEL8-Cluster-Image-Builder')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-RHEL8-Cluster-Image-Builder' failingStages += testBullet
} }
} }
} }
...@@ -173,13 +173,13 @@ pipeline { ...@@ -173,13 +173,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-cppcheck') testBullet = finalizeSlaveJob('RAN-cppcheck')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-cppcheck' failingStages += testBullet
} }
} }
} }
...@@ -199,13 +199,13 @@ pipeline { ...@@ -199,13 +199,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-PhySim-Cluster') testBullet = finalizeSlaveJob('RAN-PhySim-Cluster')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-PhySim-Cluster' failingStages += testBullet
} }
} }
} }
...@@ -220,13 +220,13 @@ pipeline { ...@@ -220,13 +220,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-RF-Sim-Test-4G') testBullet = finalizeSlaveJob('RAN-RF-Sim-Test-4G')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-RF-Sim-Test-4G' failingStages += testBullet
} }
} }
} }
...@@ -241,13 +241,13 @@ pipeline { ...@@ -241,13 +241,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-RF-Sim-Test-5G') testBullet = finalizeSlaveJob('RAN-RF-Sim-Test-5G')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-RF-Sim-Test-5G' failingStages += testBullet
} }
} }
} }
...@@ -262,13 +262,13 @@ pipeline { ...@@ -262,13 +262,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-L2-Sim-Test-4G') testBullet = finalizeSlaveJob('RAN-L2-Sim-Test-4G')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-L2-Sim-Test-4G' failingStages += testBullet
} }
} }
} }
...@@ -283,13 +283,13 @@ pipeline { ...@@ -283,13 +283,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-L2-Sim-Test-5G') testBullet = finalizeSlaveJob('RAN-L2-Sim-Test-5G')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-L2-Sim-Test-5G' failingStages += testBullet
} }
} }
} }
...@@ -304,13 +304,13 @@ pipeline { ...@@ -304,13 +304,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-LTE-FDD-LTEBOX-Container') testBullet = finalizeSlaveJob('RAN-LTE-FDD-LTEBOX-Container')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-LTE-FDD-LTEBOX-Container' failingStages += testBullet
} }
} }
} }
...@@ -326,13 +326,13 @@ pipeline { ...@@ -326,13 +326,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-LTE-FDD-OAIUE-OAICN4G-Container') testBullet = finalizeSlaveJob('RAN-LTE-FDD-OAIUE-OAICN4G-Container')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-LTE-FDD-OAIUE-OAICN4G-Container' failingStages += testBullet
} }
} }
} }
...@@ -347,13 +347,13 @@ pipeline { ...@@ -347,13 +347,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-LTE-TDD-LTEBOX-Container') testBullet = finalizeSlaveJob('RAN-LTE-TDD-LTEBOX-Container')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-LTE-TDD-LTEBOX-Container' failingStages += testBullet
} }
} }
} }
...@@ -368,13 +368,13 @@ pipeline { ...@@ -368,13 +368,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-NSA-B200-Module-LTEBOX-Container') testBullet = finalizeSlaveJob('RAN-NSA-B200-Module-LTEBOX-Container')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-NSA-B200-Module-LTEBOX-Container' failingStages += testBullet
} }
} }
} }
...@@ -389,13 +389,13 @@ pipeline { ...@@ -389,13 +389,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-SA-B200-Module-SABOX-Container') testBullet = finalizeSlaveJob('RAN-SA-B200-Module-SABOX-Container')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-SA-B200-Module-SABOX-Container' failingStages += testBullet
} }
} }
} }
...@@ -410,13 +410,13 @@ pipeline { ...@@ -410,13 +410,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-gNB-N300-Timing-Phytest-LDPC') testBullet = finalizeSlaveJob('RAN-gNB-N300-Timing-Phytest-LDPC')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-gNB-N300-Timing-Phytest-LDPC' failingStages += testBullet
} }
} }
} }
...@@ -431,13 +431,13 @@ pipeline { ...@@ -431,13 +431,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-LTE-TDD-2x2-Container') testBullet = finalizeSlaveJob('RAN-LTE-TDD-2x2-Container')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-LTE-TDD-2x2-Container' failingStages += testBullet
} }
} }
} }
...@@ -452,13 +452,13 @@ pipeline { ...@@ -452,13 +452,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-SA-AW2S-CN5G') testBullet = finalizeSlaveJob('RAN-SA-AW2S-CN5G')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-SA-AW2S-CN5G' failingStages += testBullet
} }
} }
} }
...@@ -473,13 +473,13 @@ pipeline { ...@@ -473,13 +473,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-Interop-F1') testBullet = finalizeSlaveJob('RAN-Interop-F1')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-Interop-F1' failingStages += testBullet
} }
} }
} }
...@@ -494,13 +494,13 @@ pipeline { ...@@ -494,13 +494,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('OAI-CN5G-COTS-UE-Test') testBullet = finalizeSlaveJob('OAI-CN5G-COTS-UE-Test')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * OAI-CN5G-COTS-UE-Test' failingStages += testBullet
} }
} }
} }
...@@ -515,13 +515,13 @@ pipeline { ...@@ -515,13 +515,13 @@ pipeline {
post { post {
always { always {
script { script {
finalizeSlaveJob('RAN-SA-OAIUE-CN5G') testBullet = finalizeSlaveJob('RAN-SA-OAIUE-CN5G')
} }
} }
failure { failure {
script { script {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
failingStages += '\n * RAN-SA-OAIUE-CN5G' failingStages += testBullet
} }
} }
} }
...@@ -675,6 +675,7 @@ def finalizeSlaveJob(jobName) { ...@@ -675,6 +675,7 @@ def finalizeSlaveJob(jobName) {
} else { } else {
fileName = "test_results-${jobName}.html" fileName = "test_results-${jobName}.html"
} }
artifactUrl = BUILD_URL
if (!fileExists(fileName)) { if (!fileExists(fileName)) {
copyArtifacts(projectName: jobName, copyArtifacts(projectName: jobName,
filter: 'test_results*.html', filter: 'test_results*.html',
...@@ -682,8 +683,13 @@ def finalizeSlaveJob(jobName) { ...@@ -682,8 +683,13 @@ def finalizeSlaveJob(jobName) {
if (fileExists(fileName)) { if (fileExists(fileName)) {
sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}" sh "sed -i -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' ${fileName}"
archiveArtifacts artifacts: fileName archiveArtifacts artifacts: fileName
// BUILD_URL is like http://server:port/jenkins/job/foo/15/
// no need to add a prefixed '/'
artifactUrl += 'artifact/' + fileName
} }
} }
artifactUrl = "\n * [${jobName}](${artifactUrl})"
return artifactUrl
} }
// Abstraction function to send social media messages: // Abstraction function to send social media messages:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment