Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jenkins.js #131

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hipstersmoothie
Copy link

@hipstersmoothie hipstersmoothie commented Apr 17, 2020

Trying to use env-ci in a multi-branch pipeline jenkins project. The main problem I have run into is that jenkins will make it's own branch when building (e.g PR-123). This is not the name of the actual branch it's building, and anything that tries to use the branch name will fail

https://ci.eclipse.org/webtools/env-vars.html/

Solution

Use the CHANGE_BRANCH env var

CHANGE_BRANCH

For a multibranch project corresponding to some kind of change request, this will be set to the name of the actual head on the source control system which may or may not be different from BRANCH_NAME. For example in GitHub or Bitbucket this would have the name of the origin branch whereas BRANCH_NAME would be something like PR-24.

@gr2m
Copy link
Member

gr2m commented Oct 18, 2021

Hi @hipstersmoothie, if you'd still like this change to be merged, could you please rebase on latest master and also update the tests to reflect your change, so we avoid future regressions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants