the fact that i have to do this to get the branch name is ridiculous
This commit is contained in:
parent
e3c53a1f8e
commit
d495d26d78
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue