On 22 November 2017 at 15:17, Harlan Barnes <[email protected]> wrote:

> Hello Jenkins Friends,
>
> I'm having a problem getting the configuration correct for my multi-branch
> pipeline. Here are the details
>
> * I have a Jenkins job configured with a simple Git Branch Source with the
> following options:
>   * Discover All Sources
>   * Filter by name (with regular expression): (master|v\d+\.\d+) ... this
> should pick up master and v1.14, v1.15, etc.
>
> * I see the current expected list of branches appear for building: master
> and v1.14
>
> * The Jenkinsfile for both branches is the same (v1.14 is a branch of
> master) and has the following setup for triggering with a github push:
>
>           properties([
>             pipelineTriggers([triggers: [[$class: "GitHubPushTrigger"]]])
>           ])
>

Dont do that.

Multibranch is opinionated, if you have set up your webhook correctly, you
are done. That config is what is causing your issue


>
> * When I push a change to master, both the "master" and the "v1.14"
> branches build.
>
> * The Github Hook Log for master is below and looks about what I would
> expect:
>
> Started on Nov 21, 2017 6:26:55 PM
> Started by event from 192.30.252.34 ⇒ http://not.the.real.hostname/
> github-webhook/ on Tue Nov 21 18:26:55 UTC 2017
> Using strategy: Specific revision
> [poll] Last Built Revision: Revision 69062e9fb06a7b458642c35bc07aaea1e3794cdc
> (master)
>  > git ls-remote -h [email protected]:FakeOrg/FakeRepo.git # timeout=10
> Found 91 remote heads on [email protected]:FakeOrg/FakeRepo.git
> [poll] Latest remote head revision on refs/heads/master is:
> 3fc35f5d4619a6e8bdcdec490e25378e64b674e0
> Using strategy: Default
> [poll] Last Built Revision: Revision 69062e9fb06a7b458642c35bc07aaea1e3794cdc
> (master)
>  > git ls-remote -h [email protected]:FakeOrg/FakeRepo.git # timeout=10
> Found 91 remote heads on [email protected]:FakeOrg/FakeRepo.git
> [poll] Latest remote head revision on refs/heads/master is:
> 3fc35f5d4619a6e8bdcdec490e25378e64b674e0
> Done. Took 0.48 sec
> Changes found
>
> * The Github Hook Log for v1.14 starts out okay, but then says it's
> checking "master" too:
>
> Started on Nov 22, 2017 3:05:52 PM
> Started by event from 192.30.252.45 ⇒ http://not.the.real.hostname/
> github-webhook/ on Wed Nov 22 15:05:52 UTC 2017
> Using strategy: Specific revision
> [poll] Last Built Revision: Revision 6b49bb9293b66ba6f19500b7613c992ba49dfdc6
> (v1.14)
>  > git ls-remote -h [email protected]:FakeOrg/FakeRepo.git # timeout=10
> Found 91 remote heads on [email protected]:FakeOrg/FakeRepo.git
> [poll] Latest remote head revision on refs/heads/v1.14 is:
> 6b49bb9293b66ba6f19500b7613c992ba49dfdc6 - already built by 2
> Using strategy: Default
> [poll] Last Built Revision: Revision 6b49bb9293b66ba6f19500b7613c992ba49dfdc6
> (v1.14)
>  > git ls-remote -h [email protected]:FakeOrg/FakeRepo.git # timeout=10
> Found 91 remote heads on [email protected]:FakeOrg/FakeRepo.git
> [poll] Latest remote head revision on refs/heads/master is:
> 017f8e7c0c8ba5e064418a4445aaef3f4bee13c1
> Done. Took 0.45 sec
> Changes found
>
> * As you can see in the v1.14 hook log, it says that the v1.14 branch was
> already build by build id #2 ... but then it goes on to check the head
> revision against "ref/heads/master" and says it's different and "changes
> found".
>
> Can anyone point me to the detail I'm missing in this configuration?
>
> Thanks,
>
> Harlan Barnes
>
> --
> 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/b6f0e7a1-36ea-48ba-9837-e43156389c90%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/b6f0e7a1-36ea-48ba-9837-e43156389c90%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnPnMwUpS5EYDCVd6hBjeLmR5Wyeh1ZJdzw5eVFfD50R_0KtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to