Status: Resolved (View Workflow)
We have a multibranch pipeline for building PRs:
https://qa.nuxeo.org/jenkins/job/Client/job/nuxeo-js-client-vs-master/ for https://github.com/nuxeo/nuxeo-js-client/pulls
When a new PR is created, the branch indexing is not triggered.
It is only triggered on push (probably by DefaultPushGHEventSubscriber.java)
JENKINS-37845 GitHub plugin build-on-push for Pipeline job is hard/unpredictable to work with
This is not a hook configuration issue as the hook is correctly configured and works fine.
This issue here is that Jenkins only trigger branch indexing on the Github push event and not on the pull_request event.
That's the reason why I pointed at the DefaultPushGHEventSubscriber.java, where we can see L71 that it filters only on Push event.
You can easily reproduce the case by creating a multibranch pipeline job configured ton only build PRs: when you create a PR from an existing branch and do not push any commit, the branch indexing will never happen until Jenkins receives a Push payload from any Jenkins-wide configured Github repository.
That has nothing to do with multibranch which gets triggered by:
Ah many thanks, my bad to think that the plugin was using the github-plugin.
I claim this is a hook configuration error and I am merging this issue into
JENKINS-37845where we should be addressing better hook diagnostics so that users can determine where the hook configuration issues are more easily