What is interesting is that branches seem to work fine. I have another folder where the config is:
Include Branches: * Build origin branches - Checked When the hook is received, it correctly detects the branch and creates the build: org.jenkinsci.plugins.github_branch_source.PushGHEventSubscriber$SCMHeadEventImpl CREATED event from <scrubed> → <scrubed> → <scrubed> ⇒ http://<scrubed>/github-webhook/ with timestamp Sun Apr 23 21:09:02 GMT 2017 21:09:07 Connecting to https://api.github.com using <scrubed>/****** (jenkins user/pass) Looking up myorg/sample_repo Getting remote branches... Checking branch another-test-pr ‘Jenkinsfile’ found Met criteria Scheduled build for branch: another-test-pr 0 branches were processed (query completed) Done examining myorg/sample_repo [Sun Apr 23 21:09:08 GMT 2017] org.jenkinsci.plugins.github_branch_source.PushGHEventSubscriber$SCMHeadEventImpl CREATED event from <scrubed> → <scrubed> → <scrubed> ⇒ http://<scrubed>:8080/github-webhook/ with timestamp Sun Apr 23 21:09:02 GMT 2017 processed in 1.2 sec On Sunday, April 23, 2017 at 11:08:07 AM UTC-7, [email protected] wrote: > > I've upgrading our Jenkins instance to the latest version of the SCM > plugins. We use Folders, Multibranch, GitHub Source, and Pipelines for all > of our builds. Previously, we were just building all branches but we would > like to switch over to building a few select branches and pull requests > only. > > After failing to get this working with our main folder, I setup a second > folder to test and limited it to one repository so not to trigger the rate > limits (seeing the same behavior as I did in the primary). I have the > following options set on the folder: > > Include Branches: master stage prod releases* > Build origin branches - Checked > Build origin PRs (merged with base branch) - Checked > ... > > Build fork PRs (merged with base branch) - Checked > > When the plugin scans our organization, it finds the repository and setups > up the branches and pull requests as expected: > > Looking up myorg/sample_repo > > > > Getting remote pull requests... > > > > > > Checking pull request #2257 > > > (not from a trusted source) > > > > > ‘Jenkinsfile’ found > > > Met criteria > > > > > Scheduled build for branch: PR-2257 > ... > > > > 6 pull requests were processed > > > > Getting remote branches... > > > Checking branch master > > > > > ‘Jenkinsfile’ found > > > Met criteria > > > No changes detected: master (still at > ef5c71062fe80ac2950e8ece9126d15c7e549771) > > > > > 3 branches were processed > > > > Done examining myorg/sample_repo > > > I then go and create a new pull request against the sample_repo. I can see > that the webhooks are being received correctly, but the event does not > > trigger a build for the PR: > > [Sun Apr 23 17:45:14 GMT 2017] Received > org.jenkinsci.plugins.github_branch_source.PushGHEventSubscriber$SCMHeadEventImpl > > UPDATED event from <scrubbed> → <scrubbed> → <scrubbed> ⇒ > http://<scrubbed>/github-webhook/ with timestamp Sun Apr 23 17:45:08 GMT > 2017 > 17:45:14 Connecting to https://api.github.com using <scrubbed>/****** > (jenkins user/pass) > Looking up myorg/sample_repo > > Getting remote pull requests... > > 0 pull requests were processed > > Getting remote branches... > > 0 branches were processed > > Done examining myorg/sample_reo > > [Sun Apr 23 17:45:15 GMT 2017] > org.jenkinsci.plugins.github_branch_source.PushGHEventSubscriber$SCMHeadEventImpl > > UPDATED event from <scrubbed> → <scrubbed> → <scrubbed> ⇒ > http://<scrubbed>/github-webhook/ with timestamp Sun Apr 23 17:45:08 GMT > 2017 processed in 1.1 sec > > If I subsequently go back and rescan the repo (either at a folder level or > the repo level), then the new PR is picked up and the build is kicked off. > > Any suggestions? Thanks. > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7343990b-e59b-4078-89b4-f75b7a5fc825%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
