Setting up project to monitor multiple SVN repositories (without checkout)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting up project to monitor multiple SVN repositories (without checkout)

Allen Bierbaum-2
Hello all:

My company has been evaluating Hudson as a way to replace our rapidly
aging continuous integration infrastructure.  We have moved all our
automatted processes over to Hudson (backups, monitoring scripts, etc)
and love it.  Now it is on to the autobuilds.

I think it will work but we have one oddity I don't know how to handle.

Our projects pull code and dependencies from multiple subversion
repositories.  They way they work is that there is one root repository
path to pull the specific project source code.  Then once you have
that, you run a python script in that base directory to automatically
find and collect the other repositories into the common base
repository.  So in the end it looks something like:

+ projectx_base
   - collect_code.py
   + project_code
   + binary_deps  --> pulled from other svn repository
   + common_code --> pulled from yet another svn repository

So what I need is a continuous build job that will be triggered when
code in any of the repositories changes.  I know the full repository
paths ahead of time so that is not a problem.  The problem is that I
don't want to have Hudson checkout all of these repositories.  I just
want it to monitor them for changes and then have build steps in the
job run the collect_code.py script to actually bring in the external
code dependencies.

Can anyone think of a clean way to do this?

To make it even more complex, I would like to have the committer that
is on the hook for the build (ie. the person that get's blamed if it
breaks) to be accurate no matter which repository changed.  So for
example if [hidden email] changed the code in common_code, then
projectx should rebuild and if it is broken, bob gets notified that he
broke the build.   Any way to do this?

I am open to any ideas.

Thanks,
Allen

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: Setting up project to monitor multiple SVN repositories (without checkout)

pcampbell
This post has NOT been accepted by the mailing list yet.
Out of Office AutoReply: Setting up project to monitor multiple SVN repositories (without checkout)

I am out of the office Monday, March 1 through Friday, March 5 and am unable to respond to your email.  I will return on Monday, March 8.

If you need immediate assistance for Hudson issues, contact Jason Collins, otherwise please contact Juan Nunez.

Reply | Threaded
Open this post in threaded view
|

Re: Setting up project to monitor multiple SVN repositories (without checkout)

Sami Tikka
In reply to this post by Allen Bierbaum-2
2010/2/27 Allen Bierbaum <[hidden email]>:
> So what I need is a continuous build job that will be triggered when
> code in any of the repositories changes.  I know the full repository
> paths ahead of time so that is not a problem.  The problem is that I
> don't want to have Hudson checkout all of these repositories.  I just
> want it to monitor them for changes and then have build steps in the
> job run the collect_code.py script to actually bring in the external
> code dependencies.

You can set up hook scripts into the svn repositories that trigger a
Hudson to launch a build of a job.

The job can be configured with no SCM, or with the root project svn
path only and then execute the collect_code.py that checks out the
rest of the code.

> To make it even more complex, I would like to have the committer that
> is on the hook for the build (ie. the person that get's blamed if it
> breaks) to be accurate no matter which repository changed.  So for
> example if [hidden email] changed the code in common_code, then
> projectx should rebuild and if it is broken, bob gets notified that he
> broke the build.   Any way to do this?

Hmm... I think if you need Hudson to know the commits (in order to
send email to the guilty party/parties), Hudson probably needs to
check out all the code.

Then you would need to stop checking out code with collect_code.py.
You should be able to achieve a similar effect by setting up your
repository structure with svn externals. Then Hudson can poll and
check out all the code and then it should know all the commits and
committers and who to blame (always very important :)

-- Sami

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Setting up project to monitor multiple SVN repositories (without checkout)

Allen Bierbaum-2
On Sat, Feb 27, 2010 at 9:51 AM, Sami Tikka <[hidden email]> wrote:

> 2010/2/27 Allen Bierbaum <[hidden email]>:
>> So what I need is a continuous build job that will be triggered when
>> code in any of the repositories changes.  I know the full repository
>> paths ahead of time so that is not a problem.  The problem is that I
>> don't want to have Hudson checkout all of these repositories.  I just
>> want it to monitor them for changes and then have build steps in the
>> job run the collect_code.py script to actually bring in the external
>> code dependencies.
>
> You can set up hook scripts into the svn repositories that trigger a
> Hudson to launch a build of a job.

The thing is that there may be multiple projects that all depend upon
the same dependency repository.  Wouldn't this require that the
trigger knows ahead of time about every project that relies upon it
and every build of that project.  This seems like it would introduce a
dependency inversion that would be very difficult to maintain
(especially across releases branches, etc).

I was hoping there may be a way to point at an svn repository and have
it polled for changed every few minutes but not do a full checkout.
(ie. use svn info to collect stats).  I was even toying with the idea
of setting up an svn web front end that could have a page at a known
url that says the latest revision for this branch.  That could (maybe)
be used with the URL monitor trigger.  But the problem there is that
it may miss some revisions and I would really like the job to run once
for every change in the repository.

> The job can be configured with no SCM, or with the root project svn
> path only and then execute the collect_code.py that checks out the
> rest of the code.
>
>> To make it even more complex, I would like to have the committer that
>> is on the hook for the build (ie. the person that get's blamed if it
>> breaks) to be accurate no matter which repository changed.  So for
>> example if [hidden email] changed the code in common_code, then
>> projectx should rebuild and if it is broken, bob gets notified that he
>> broke the build.   Any way to do this?
>
> Hmm... I think if you need Hudson to know the commits (in order to
> send email to the guilty party/parties), Hudson probably needs to
> check out all the code.
>
> Then you would need to stop checking out code with collect_code.py.
> You should be able to achieve a similar effect by setting up your
> repository structure with svn externals. Then Hudson can poll and
> check out all the code and then it should know all the commits and
> committers and who to blame (always very important :)

Understood.  I left out one key part.  The base bootstrapping is the
same for each project.  The script gets run with an argument
(configuration file) that pulls different code depending upon what
project configuration it is given.  This keeps svn externals from
working for us in our case. :(

-Allen

>
> -- Sami
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: Setting up project to monitor multiple SVN repositories (without checkout)

pcampbell
This post has NOT been accepted by the mailing list yet.
Out of Office AutoReply: Setting up project to monitor multiple SVN repositories (without checkout)

I am out of the office Monday, March 1 through Friday, March 5 and am unable to respond to your email.  I will return on Monday, March 8.

If you need immediate assistance for Hudson issues, contact Jason Collins, otherwise please contact Juan Nunez.