Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-42154

Triggering branch indexing on pull request creation

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Major Major
    • None
    • Jenkins 1.642.4.2
      workflow-multibranch 2.9
      github-branch-source 1.10

      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-42154] Triggering branch indexing on pull request creation

          I claim this is a hook configuration error and I am merging this issue into JENKINS-37845 where we should be addressing better hook diagnostics so that users can determine where the hook configuration issues are more easily

          Stephen Connolly added a comment - I claim this is a hook configuration error and I am merging this issue into JENKINS-37845 where we should be addressing better hook diagnostics so that users can determine where the hook configuration issues are more easily

          Hello,
          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.

          Pierre-Gildas MILLON added a comment - Hello, 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.

          Stephen Connolly added a comment - That has nothing to do with multibranch which gets triggered by: https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/PushGHEventSubscriber.java and https://github.com/jenkinsci/github-branch-source-plugin/blob/master/src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestGHEventSubscriber.java

          Ah many thanks, my bad to think that the plugin was using the github-plugin.

          Pierre-Gildas MILLON added a comment - Ah many thanks, my bad to think that the plugin was using the github-plugin.

            Unassigned Unassigned
            pgmillon Pierre-Gildas MILLON
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: