0
votes

I'm trying to use this plugin:

https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Integration+Plugin

which should export a variable GITHUB_PR_NUMBER, that corresponds to the branch GitHub is using for pull-requests.

The installation instructions say to add this to the refspec: +refs/pull/${GITHUB_PR_NUMBER}/merge:refs/remotes/origin/pull/${GITHUB_PR_NUMBER}/merge

And this to the branch specifier: origin/pull/${GITHUB_PR_NUMBER}/merge

However this variable does not expand at all. BUILD_NUMBER seems to expand fine, though.

Not sure what's wrong with my Jenkins setup.

1

1 Answers

0
votes

Immediately after posting, I naturally find the answer in the FAQ: add -Dhudson.model.ParametersAction.keepUndefinedParameters=true to jenkins config.xml on startup.

I guess the variables are undefined initially and get filled in later.