Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins how to set build status on Github commit?

Tags:

github

jenkins

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.

like image 345
David Hodnett Avatar asked May 13 '16 03:05

David Hodnett


1 Answers

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.

like image 196
Eric Betts Avatar answered Oct 16 '22 11:10

Eric Betts