Closed sgtcoolguy closed 6 years ago
For reference:
CHANGE_TARGET
is used in multi branch jenkins pipeline jobs and is only set when the build is from a PR. The value is the target branch the PR is intended to merge into.CHANGE_BRANCH
- I can't find the exact definition for. Looks like it used to be used by pipeline jobs, but now typically holds the same value as BRANCH_NAME
BRANCH_NAME
- this is the "current" branch name. For PRs using multi branch pipeline, the value is typically something like "PR-123"
GIT_BRANCH
comes from the Git plugin for older/non-pipeline jobs: https://wiki.jenkins.io/display/JENKINS/Git+Plugin I cannot tell if this is the "target" branch to merge into or the "source" branch of the PR.I think the typical config nowadays would be to use a multi branch pipeline job, so the right choice would be CHANGE_TARGET
there. For older legacy builds using Github Pull request builder, my best guess is that ghprbTargetBranch
would be the value that should actually be used: https://wiki.jenkins.io/display/JENKINS/GitHub+pull+request+builder+plugin#GitHubpullrequestbuilderplugin-EnvironmentVariables
:tada: This PR is included in version 2.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Consult env vars in order:
CHANGE_TARGET
,CHANGE_BRANCH
,BRANCH_NAME
,GIT_BRANCH
to resolve original branch.