Jesse Glick: I am trying to get github/repoA/Jenkinsfile to use github/repoB. The sample code that you provided works (polling, on a schedule). Is it possible to get it to work on-push for rebuild of repoA when repoB is pushed?
When I use pollSCM("# on push"), nothing happens (either on push or at any later point). I am guessing that the $Jenkins/github-webhook is not triggering the immediate pollSCM?
If I use githubPush() trigger, it double-triggers the main-repo (sometimes the builds are coalesced, sometimes not if concurrent builds are allowed); but I think this ticket implies that the githubPush() trigger should not be used in org/repo/branch jobs.
Alternately, I suppose I could add upstream-downstream relationships, but I have been trying to keep the triggers based on SCM vs jobs.
Note though that my Jenkins is at 2.60.1, and GitHub Branch Source 2.0.7 (a few months old), so maybe I should try upgrading, but it is probably my expectation that is wrong (user error, not a bug).