From 75a35fb35a742cc24f993e6c890619f8bdbb2e79 Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Thu, 1 Oct 2020 16:27:50 +0200 Subject: [PATCH] Improve logging wrt the docker image used for launching piper-go (#1578) Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com> --- vars/piperExecuteBin.groovy | 5 +++-- vars/sonarExecuteScan.groovy | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vars/piperExecuteBin.groovy b/vars/piperExecuteBin.groovy index af713dbb0..18ac5a873 100644 --- a/vars/piperExecuteBin.groovy +++ b/vars/piperExecuteBin.groovy @@ -62,7 +62,7 @@ void call(Map parameters = [:], String stepName, String metadataFile, List crede config.stashNoDefaultExcludes = parameters.stashNoDefaultExcludes } - dockerWrapper(script, config) { + dockerWrapper(script, stepName, config) { handleErrorDetails(stepName) { script.commonPipelineEnvironment.writeToDisk(script) try { @@ -141,8 +141,9 @@ static String getCustomConfigArg(def script) { } // reused in sonarExecuteScan -void dockerWrapper(script, config, body) { +void dockerWrapper(script, stepName, config, body) { if (config.dockerImage) { + echo "[INFO] executing pipeline step '${stepName}' with docker image '${config.dockerImage}'" Map dockerExecuteParameters = [:].plus(config) dockerExecuteParameters.script = script dockerExecute(dockerExecuteParameters) { diff --git a/vars/sonarExecuteScan.groovy b/vars/sonarExecuteScan.groovy index dfbb691e1..43289aac9 100644 --- a/vars/sonarExecuteScan.groovy +++ b/vars/sonarExecuteScan.groovy @@ -60,7 +60,7 @@ void call(Map parameters = [:]) { // load certificates into cacerts file loadCertificates(customTlsCertificateLinks: stepConfig.customTlsCertificateLinks, verbose: stepConfig.verbose) // execute step - piperExecuteBin.dockerWrapper(script, config){ + piperExecuteBin.dockerWrapper(script, STEP_NAME, config){ if(!fileExists('.git')) utils.unstash('git') piperExecuteBin.handleErrorDetails(STEP_NAME) { withSonarQubeEnv(stepConfig.instance) {