diff --git a/Jenkinsfile b/Jenkinsfile index 2544588..2be9607 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,13 +7,12 @@ pipeline { stages { stage('Show the branch 1') { - + GIT_BRANCH_LOCAL = sh ( + script: "echo $Branch | sed -e 's|origin/||g'", + returnStdout: true + ).trim() + steps { - GIT_BRANCH_LOCAL = sh ( - script: "echo $Branch | sed -e 's|origin/||g'", - returnStdout: true - ).trim() - echo "Git branch: ${GIT_BRANCH_LOCAL}" sh '/bin/true' echo "BRANCH IS: ${env.BRANCH}"