1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-03-03 15:02:35 +02:00

Check env.BRANCH_NAME before using (#1992)

This commit is contained in:
Stephan Aßmus 2020-09-09 12:38:38 +02:00 committed by GitHub
parent e6534d0400
commit c95f2d10ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ void call(Map parameters = [:]) {
environment.add("PIPER_changeId=${env.CHANGE_ID}")
environment.add("PIPER_changeBranch=${env.CHANGE_BRANCH}")
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}")
}
try {