8

I have set up Jenkins and Github such that whenever I push a commit to an existing pull request, it automatically adds a comment and triggers a Jenkins build. Prior to today, Jenkins amended that comment with the status of the build and the functional tests executed. (So I know that part works.)

Today, I updated Jenkins and Jenkins ceases to notify Github of the build status. When I check the Jenkins configuration, the post-build section says:

Set build status on Github commit [deprecated]

This notifier will set GH commit status. This step is DEPRECATED and will be migrated to new step in one of the next major plugin releases. Please refer to new universal step.

Are they saying they removed functionality and I need to either downgrade or wait for them to restore it when they get around to releasing an update?

Alternatively, if they want me to start using this new "universal step", where can I find the documentation on setting that up?

I looked at Show current state of Jenkins build on GitHub repo but it appears the answers to that question are now obsolete (answered six months ago).

I am currently using Jenkins version 2.3, Github plugin 1.19.1 and Github API plugin 1.75.

Community
  • 1
  • 1
David Hodnett
  • 83
  • 1
  • 4

1 Answers1

4

I think you may have been bitten by this issue: https://wiki.jenkins-ci.org/display/JENKINS/Plugins+affected+by+fix+for+SECURITY-170

It says

If using the standard ${sha1} branch spec, builds will fail with "Couldn't find any revision to build". Pull requests remain in the "pending" state as the plugin fails to update the PR with the build outcome

It sounds like this can be fixed by using a whitelist of terms. In my case, this was handled by another engineer, so I can't provide firsthand details.

Eric Betts
  • 471
  • 2
  • 8
  • Thank you. Bonus for linking to the documentation. I followed that paper trail and was able to use the temporary workaround long enough to build the product, as well as develop a roadmap outlining Jenkins' recommended changes (which is a fairly lengthly list). – David Hodnett May 16 '16 at 18:36
  • @DavidHodnett : Please answer your solution so that people having the same error will resolve their problem. – Sunny Jain Oct 07 '16 at 11:34
  • 1
    I still recommend Eric's answer. The [Security 170](https://wiki.jenkins-ci.org/display/JENKINS/Plugins+affected+by+fix+for+SECURITY-170) link Eric recommended has a GitHub pull request builder plugin section. Expand it, and it identifies the version of the plugin you'll need to download in order to fix the problem. 1.32.3 if you're curious. I did so and switched to `${ghprbActualCommit}` (which IMHO is a better variable name) simultaneously, which solved the problem for me. – David Hodnett Oct 11 '16 at 00:47