From 91e06da34cbed5e75310ae43632add50c01b7326 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Fri, 16 Oct 2020 10:46:02 +0100 Subject: [PATCH 1/2] [CI] Add stage name in the step --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f3618d6615f..4d0314d61c8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -208,7 +208,7 @@ def target(Map args = [:]) { // make commands use -C while mage commands require the dir(folder) // let's support this scenario with the location variable. dir(isMage ? directory : '') { - cmd(label: "${command}", script: "${command}") + cmd(label: "${env.STAGE_NAME} - ${command}", script: "${command}") } } } @@ -313,7 +313,7 @@ def withBeatsEnv(Map args = [:], Closure body) { */ def fixPermissions(location) { if(isUnix()) { - sh(label: 'Fix permissions', script: """#!/usr/bin/env bash + sh(label: "${env.STAGE_NAME} - Fix permissions", script: """#!/usr/bin/env bash set +x source ./dev-tools/common.bash docker_setup From a1ff96d0ff833a01fffed97cd5d696099adc50c5 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Fri, 16 Oct 2020 12:02:45 +0100 Subject: [PATCH 2/2] Use args.id instead STAGE_NAME since it does not work with dynamic stages --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4d0314d61c8..46143ba0707 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -208,7 +208,7 @@ def target(Map args = [:]) { // make commands use -C while mage commands require the dir(folder) // let's support this scenario with the location variable. dir(isMage ? directory : '') { - cmd(label: "${env.STAGE_NAME} - ${command}", script: "${command}") + cmd(label: "${args.id?.trim() ? args.id : env.STAGE_NAME} - ${command}", script: "${command}") } } } @@ -313,7 +313,7 @@ def withBeatsEnv(Map args = [:], Closure body) { */ def fixPermissions(location) { if(isUnix()) { - sh(label: "${env.STAGE_NAME} - Fix permissions", script: """#!/usr/bin/env bash + sh(label: 'Fix permissions', script: """#!/usr/bin/env bash set +x source ./dev-tools/common.bash docker_setup