Mark,

I am learning things, and putting things together at the same time, but I
think that I might have to do something like this:


(1)  If I have these repos:
                 repo1  (main repo with Makefile with "make checkout"
target)
                 repo2
                 repo3
                 repo4

       then in the post-receive commit trigger for repo2, repo3, repo4.  I
need to
       explicitly do an http post on the job:
            JENKINS_URL/job/JOBNAME/build?token=TOKEN

       as per https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API

       in order to trigger the build.  The build steps I have will do:

       "make checkout; make"

     This will check out the sources from all 4 repositories, and then do
the build.

(2)  In the post-receive commit trigger repo2, I cannot use the Git
plugin's notifyCommit on repo1
           as per Kohsuke's blog "Polling Must Die", because if the sources
        has changed in repo2, and you do a notifyCommit on repo1,
        the Git plugin will poll repo1, and not do a build, because no
sources have changed in repo1.


(3)  As an additional option, I might want to use the MultiSCM plugin, but
only use the MultiSCM plugin
      to check out repositories in some /dummy directory that is not used
during the build.
      If I don't use the MultiSCM plugin, then "Recent Changes" will
reflect changes
      in repo2, repo3, repo4.   The "make checkout" target in repo1 will do
the "correct" checkouts
      which will have the sources in place to do the build.

Thanks.
--
Craig



On Mon, Jan 13, 2014 at 4:35 PM, Mark Waite <[email protected]>wrote:

> If your git server is allowed to use "curl" to read a URL on your Jenkins
> server, then you can use a git commit hook to notify the top level project
> on any submission to all of the repos you listed.  Each repo would have a
> hook to the same URL (the URL for your top level job) so that any time a
> change was submitted to any one of the projects, the project will build.
>
> Refer to Kohsuke Kawaguchi's "Polling Must Die" blog posting for hints on
> how to configure it.
>
>
> http://kohsuke.org/2011/12/01/polling-must-die-triggering-jenkins-builds-from-a-git-hook/
>
> The multiple SCM plugin may also be able to do that, and would probably
> allow you to see the commits in the "Recent Changes" portion of the job
> definition.  However, that will probably be more complicated than adding a
> hook to each of your git repositories.
>
> Mark Waite
>
>
> On Mon, Jan 13, 2014 at 5:22 PM, Craig Rodrigues <[email protected]>wrote:
>
>> Hi,
>>
>> I am setting up Jenkins for the FreeNAS ( http://www.freenas.org )
>> project.
>>
>> The FreeNAS source code is made up of multiple
>> git repositories:
>>           repo1
>>           repo2
>>           repo3
>>           etc.
>>
>> In the top-level Makefile for our project, we have a Makefile target:
>> make checkout
>>
>> This target has all the logic to checkout the necessary git repos.
>> For an existing checked out tree, the "make checkout" target will
>> update the sources from the necessary repos.
>>
>> In Jenkins, I set up a free-style project that does
>>
>> make checkout
>> make
>>
>> This is enough to checkout and build all of FreeNAS.
>>
>>
>> For Jenkins, I want to put commit triggers in all the repos
>> (repo1, repo2, repo3, etc.) that notify Jenkins for any commit.
>> When the notification is received, I want it to execute:
>>
>> make checkout
>> make
>>
>> I started looking at the Multiple SCMs Plugin (
>> https://wiki.jenkins-ci.org/display/JENKINS/Multiple+SCMs+Plugin )
>> but I am not sure if that does exactly what I want.
>>
>> I want the following:
>>      (1)  Jenkins should only check out the top-level project
>>      (2)  Jenkins should receive notifications for repo1,repo2,repo3
>>             via commit trigger
>>      (3)  If any repo has been updated, then the top-level:
>>                  make checkout
>>                   make
>>             should run.
>>
>> Can this workflow be made to work with the Multiple SCM plugin,
>> or do I need to do something else.
>>
>> Thanks.
>>
>> --
>> Craig
>>
>>
>>  --
>> 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].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Thanks!
> Mark Waite
>
> --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to