mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-05 15:15:44 +02:00
Check env.BRANCH_NAME before using (#1992)
This commit is contained in:
parent
e6534d0400
commit
c95f2d10ca
@ -52,7 +52,7 @@ void call(Map parameters = [:]) {
|
|||||||
environment.add("PIPER_changeId=${env.CHANGE_ID}")
|
environment.add("PIPER_changeId=${env.CHANGE_ID}")
|
||||||
environment.add("PIPER_changeBranch=${env.CHANGE_BRANCH}")
|
environment.add("PIPER_changeBranch=${env.CHANGE_BRANCH}")
|
||||||
environment.add("PIPER_changeTarget=${env.CHANGE_TARGET}")
|
environment.add("PIPER_changeTarget=${env.CHANGE_TARGET}")
|
||||||
} else if (!isProductiveBranch(script)) {
|
} else if (!isProductiveBranch(script) && env.BRANCH_NAME) {
|
||||||
environment.add("PIPER_branchName=${env.BRANCH_NAME}")
|
environment.add("PIPER_branchName=${env.BRANCH_NAME}")
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user