NOTICK: Merging forward updates from OS 4.4 to OS 4.5 (2022-01-07) (#7007)

* backported from emergency releases for log4j updates
* adds a build parameter, which control if tests should be run or not, default is `true`
This commit is contained in:
Waldemar Żurowski
2022-01-08 22:10:27 +01:00
committed by GitHub
parent 0eeaa743d3
commit 99403e9d18

View File

@ -65,6 +65,7 @@ pipeline {
parameters { parameters {
choice choices: nexusIqStageChoices, description: 'NexusIQ stage for code evaluation', name: 'nexusIqStage' choice choices: nexusIqStageChoices, description: 'NexusIQ stage for code evaluation', name: 'nexusIqStage'
booleanParam defaultValue: true, description: 'Run tests during this build?', name: 'DO_TEST'
} }
/* /*
@ -91,6 +92,9 @@ pipeline {
} }
stage('Stash') { stage('Stash') {
when {
expression { params.DO_TEST }
}
steps { steps {
stash name: 'compiled', useDefaultExcludes: false stash name: 'compiled', useDefaultExcludes: false
} }
@ -115,6 +119,10 @@ pipeline {
} }
stage('All Tests') { stage('All Tests') {
when {
expression { params.DO_TEST }
beforeAgent true
}
parallel { parallel {
stage('Another agent') { stage('Another agent') {
agent { agent {
@ -297,10 +305,12 @@ pipeline {
always { always {
script { script {
try { try {
unstash 'allure-input' if (params.DO_TEST) {
allure includeProperties: false, unstash 'allure-input'
jdk: '', allure includeProperties: false,
results: [[path: '**/allure-input']] jdk: '',
results: [[path: '**/allure-input']]
}
} catch (err) { } catch (err) {
echo("Allure report generation failed: $err") echo("Allure report generation failed: $err")