From 22103fadcacbe288b9d02772d3464fd383c8d5a8 Mon Sep 17 00:00:00 2001 From: Christopher Fenner Date: Wed, 31 Jan 2018 16:56:18 +0100 Subject: [PATCH] add step name to echo --- vars/checkResultsPublish.groovy | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vars/checkResultsPublish.groovy b/vars/checkResultsPublish.groovy index 5153ef2ca..1670a7abe 100644 --- a/vars/checkResultsPublish.groovy +++ b/vars/checkResultsPublish.groovy @@ -1,13 +1,15 @@ import com.cloudbees.groovy.cps.NonCPS import com.sap.piper.Utils +def getStepName(){return 'checkResultsPublish'} + /** * checkResultsPublish * * @param others document all parameters */ def call(Map parameters = [:]) { - handlePipelineStepErrors (stepName: 'checkResultsPublish', stepParameters: parameters) { + handlePipelineStepErrors (stepName: getStepName(), stepParameters: parameters) { // GENERAL def tasks = parameters.get('tasks', false) def aggregation = parameters.get('aggregation', [:]) @@ -118,7 +120,7 @@ def isMap(object){ def archiveResults(archive, pattern, allowEmpty){ if(archive){ - echo "archive ${pattern}" + echo "[${getStepName()}] archive ${pattern}" archiveArtifacts artifacts: pattern, allowEmptyArchive: allowEmpty } }