-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins v2.23, Bitbucket branch source plugin v1.8
This is a regression from v1.7. In v1.7 I could test whether PR is being built with 'env.BRANCH_NAME.startsWith("PR-")', and in v1.8 'env.BRANCH_NAME' is set to name of branch from which pull request originates. This is OK for me, but the I would expect 'env. CHANGE_ID' to be set to non-null and contain information about pull request number. However, in v1.8 CHANGE_ID is null even for pull requests, while BRANCH_NAME contains name of branch for both pull requests and branches.
How to detect from script whether PR or branch is being built? I want different build behaviour for PRs and feature branches.
- is related to
-
JENKINS-40486 Plugin does not adhere to documented global variables
-
- Open
-
[JENKINS-38419] Unable to detect PullRequest anymore
Link | New: This issue is related to JENKINS-40486 [ JENKINS-40486 ] |
Comment | [ This issue broke almost every build in my organization when it got updated today. We're doing an emergency rollback. This is a pretty big regression. ] |
Assignee | Original: Antonio Muñiz [ amuniz ] | New: Nikolas Falco [ nfalco ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |