diff --git a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy index d71c7b1d..73e6fb10 100644 --- a/first-class-pipeline/vars/executeFreeleapsPipeline.groovy +++ b/first-class-pipeline/vars/executeFreeleapsPipeline.groovy @@ -432,7 +432,7 @@ def generateComponentStages(component, configurations) { log.info("Pipeline", "Retrieve version of image from pervious stage...") if (env.LATEST_VERSION == null || env.LATEST_VERSION.isEmpty()) { log.warn("Pipeline", "LATEST_VERSION environment value not set, using 'snapshot-' as default version") - + sh "git config --global --add safe.directory ${env.workroot}" def commitHash = sh(script: 'git rev-parse HEAD', returnStdout: true).trim() def shortCommitHash = commitHash.take(7) env.LATEST_VERSION = "snapshot-${shortCommitHash}"