1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-02-07 13:42:23 +02:00

Pass stageName through to steps (#1796)

This commit is contained in:
Daniel Kurzynski 2020-07-17 13:32:49 +02:00 committed by GitHub
parent 5e67c9c014
commit f933788d86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 20 deletions

View File

@ -75,19 +75,19 @@ void call(Map parameters = [:]) {
} else {
if (config.cloudFoundryDeploy) {
durationMeasure(script: script, measurementName: 'deploy_test_cf_duration') {
cloudFoundryDeploy script: script
cloudFoundryDeploy script: script, stageName: stageName
}
}
if (config.neoDeploy) {
durationMeasure(script: script, measurementName: 'deploy_test_neo_duration') {
neoDeploy script: script
neoDeploy script: script, stageName: stageName
}
}
}
if (config.healthExecuteCheck) {
healthExecuteCheck script: script
healthExecuteCheck script: script, stageName: stageName
}
@ -97,7 +97,7 @@ void call(Map parameters = [:]) {
if (config.gaugeExecuteTests) {
durationMeasure(script: script, measurementName: 'gauge_duration') {
publishResults = true
gaugeExecuteTests script: script
gaugeExecuteTests script: script, stageName: stageName
publishMap += [gauge: [archive: true]]
}
}
@ -105,18 +105,19 @@ void call(Map parameters = [:]) {
if (config.newmanExecute) {
durationMeasure(script: script, measurementName: 'newman_duration') {
publishResults = true
newmanExecute script: script
newmanExecute script: script, stageName: stageName
}
}
if (config.uiVeri5ExecuteTests) {
durationMeasure(script: script, measurementName: 'uiveri5_duration') {
publishResults = true
uiVeri5ExecuteTests script: script
uiVeri5ExecuteTests script: script, stageName: stageName
}
}
if (publishResults) {
publishMap.stageName = stageName
testsPublishResults publishMap
}
}

View File

@ -54,11 +54,11 @@ void call(Map parameters = [:]) {
durationMeasure(script: script, measurementName: 'build_duration') {
buildExecute script: script
pipelineStashFilesAfterBuild script: script
buildExecute script: script, stageName: stageName
pipelineStashFilesAfterBuild script: script, stageName: stageName
testsPublishResults script: script, junit: [updateResults: true]
checksPublishResults script: script
testsPublishResults script: script, junit: [updateResults: true], stageName: stageName
checksPublishResults script: script, stageName: stageName
}
}
}

View File

@ -46,15 +46,12 @@ void call(Map parameters = [:]) {
try {
if (config.npmExecuteScripts) {
publishResults = true
//TODO Remove once config resolution supports technical names as well as labels for stages
withEnv(["STAGE_NAME=${stageName}"]) {
npmExecuteScripts script: script
}
npmExecuteScripts script: script, stageName: stageName
}
}
finally {
if (publishResults) {
testsPublishResults script: script
testsPublishResults script: script, stageName: stageName
}
}
}

View File

@ -62,29 +62,29 @@ void call(Map parameters = [:]) {
} else {
if (config.cloudFoundryDeploy) {
durationMeasure(script: script, measurementName: 'deploy_release_cf_duration') {
cloudFoundryDeploy script: script
cloudFoundryDeploy script: script, stageName: stageName
}
}
if (config.neoDeploy) {
durationMeasure(script: script, measurementName: 'deploy_release_neo_duration') {
neoDeploy script: script
neoDeploy script: script, stageName: stageName
}
}
}
if (config.tmsUpload) {
durationMeasure(script: script, measurementName: 'upload_release_tms_duration') {
tmsUpload script: script
tmsUpload script: script, stageName: stageName
}
}
if (config.healthExecuteCheck) {
healthExecuteCheck script: script
healthExecuteCheck script: script, stageName: stageName
}
if (config.githubPublishRelease) {
githubPublishRelease script: script
githubPublishRelease script: script, stageName: stageName
}
}