Multibranch is designed to remove the need for individual jobs to poll.

When a scan is performed, we get - in one set of requests - all the head
revisions and then trigger builds for all branches with changes. This
reduces the impact of many jobs polling. Additionally events are
consolidated on a single path meaning that jobs get triggered without
needing a scan at all and with only verification of the event details.

The down-side (currently) is that we do not have a good solution for where
you want to check out multiple sources. This in part reflects some of the
difficulties involved. For one, there is the question of how to align
branches:

* do you always check out the "master" branch of the second repository?

* do you always check out the same named branch?

* do you check out the same named branch and fall back to the master branch
if there is no matching one?

* what about more complex flows like with git flow?

* it is highly unlikely that PRs against different repos will get the same
number, how do you determine the branch to use for PRs

And that is just the start of the problem.

Right now my recommendation is to use a Jenkinsfile in the second repo that
just triggers the build in the first repo. That way the commit against the
second repo will trigger a build of your main job that checks out the
primary and secondary repos.
On Tue 28 Feb 2017 at 16:45, <[email protected]> wrote:

> I am able to create a Pipeline job, and have the job do a git clone of two
> repos.  When there are commits in either repo, the job is triggered.
>
> However, I cannot get this to work with GitHub Org Folder / Repo /
> Branch.  The job is only triggered when the repo/branch is modified,
> despite it checking out other repos.
>
> I also noticed that in the GitHub Org job, there is no "PollSCM" in the
> top-level GitHub Org job.  However, in the repo/branch job, there is a
> "PollSCM", but the configuration of the job is read-only.  In order for the
> Pipeline build to work with multiple repos, then "PollSCM" option must be
> enabled.
>
> I would like to be able to do this:
>
> https://github.com/user/mylib - builds a library
> https;//github.com/user/myapp - builds an app
>
> myapp/Jenkinsfile:
>   dir("mylib") { git "https://github.com/user/mylib"; }
>   dir("myapp") { git "https://github.com/user/myapp"; }
>   sh 'do-build'
>
> Then, have the myapp job get triggered when there is a commit in either
> mylib or myapp.
>
> I have tried with a fresh download of Jenkins and up-to-date plugins.
> Details available upon request...
>
> -Justin
>
> --
> 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/8b67b1b4-0a4b-486f-a0e6-4f5e27d3f4b7%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/8b67b1b4-0a4b-486f-a0e6-4f5e27d3f4b7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Sent from my phone

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

Reply via email to