From d495d26d78b1950947681b7869ca24926c707945 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Fri, 22 Apr 2022 02:48:26 -0500 Subject: [PATCH] the fact that i have to do this to get the branch name is ridiculous --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 963a74c..9e0c043 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,7 @@ pipeline { agent any environment { - BRANCH_NAME = "${GIT_BRANCH.split("/")[1]}" + BRANCH_NAME = "${GIT_BRANCH.split('/').size() > 1 ? GIT_BRANCH.split('/')[1..-1].join('/') : GIT_BRANCH}" } options { buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '5')