In a prior entry, I wrote about getting your HIPP Instance at Eclipse to run GitHub Pull Requests. One thing that is missing from that is, the ability to identify which of the jobs that ran, ran which pull request. By default, Hudson only outputs the job number, so if you have multiple pull requests that are being run, there isn’t an easy way to identify which job number is associated with which pull request.
With Jenkins this would be pretty easy, as the Set Build Name plugin has been updated so it can accept Jenkins variables, unfortunately the equivalent plugin in Hudson is way behind and doesn’t understand variables besides it’s own. There is a work around though.
Install the Set Env Plugin, which allows you to inject before the build begins system environment variables. You can then, use the Set Build Name plugin to have it use the injected environment variable.
The setup looks similar to this:
The PULLREQUEST_NUMBER is the Build Parameter to identify which pull request should be run. When the job now runs you’ll get the following output in your build history.
The job number and the Pull Request Number will be displayed for easy and quick access to the results of a particular pull request.