Re: I don't understand how to express to hudson how it must use subversion

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

Re: I don't understand how to express to hudson how it must use subversion

Dimitris Andreou
Hi,
I have a repository layout like this:
/repository/some-file.xml
/repository/shared-libs
/repository/projectA/trunk/build.xml
/repository/projectA/trunk/ <other project files, sources etc>

The "repository" folder is the root subversion repository.

I'm trying to configure a job for Hudson to build "projectA". But this
needs the "some-file.xml" and "shared-libs" folder. How can I do this?
If I would do it by hand, I would have a shared (between all project
jobs) repository, which would get updated (all of it) before any build.

What should I put to "Repository URL" and to "Local module directory
(optional)" to at least build it?

I tried putting the full URL: "svn://my.ip/repository/projectA/trunk",
but obviously, the working copy that is created doesn't see the needed
files.

If I put only "svn://my.ip/repository/", then it won't find the
build.xml, and this would also mean it checkouts the complete
repository, possibly for every project job. (But then, I can tell it to
do only updates thereafter, but still, can't I share a working copy of
the repository?). But the problem is that it wouldn't find build.xml (I
haven't tried it, checkout would take too much time).

Any ideas?? What is the common practice to do builds are not in
self-contained folders but need to look in back folders?

Thanks a lot,
Dimitris

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

Reply | Threaded
Open this post in threaded view
|

Re: I don't understand how to express to hudson how it must use subversion

Kohsuke Kawaguchi
Administrator
Dimitris Andreou wrote:

> Hi,
> I have a repository layout like this:
> /repository/some-file.xml
> /repository/shared-libs
> /repository/projectA/trunk/build.xml
> /repository/projectA/trunk/ <other project files, sources etc>
>
> The "repository" folder is the root subversion repository.
>
> I'm trying to configure a job for Hudson to build "projectA". But this
> needs the "some-file.xml" and "shared-libs" folder. How can I do this?
> If I would do it by hand, I would have a shared (between all project
> jobs) repository, which would get updated (all of it) before any build.
>
> What should I put to "Repository URL" and to "Local module directory
> (optional)" to at least build it?
>
> I tried putting the full URL: "svn://my.ip/repository/projectA/trunk",
> but obviously, the working copy that is created doesn't see the needed
> files.
>
> If I put only "svn://my.ip/repository/", then it won't find the
> build.xml, and this would also mean it checkouts the complete
> repository, possibly for every project job. (But then, I can tell it to
> do only updates thereafter, but still, can't I share a working copy of
> the repository?). But the problem is that it wouldn't find build.xml (I
> haven't tried it, checkout would take too much time).
When you say "it wouldn't find build.xml", I suppose you mean you choose
Ant as the main builder. In that case I think you can just add "-f
projectA/trunk/build.xml"

> Any ideas?? What is the common practice to do builds are not in
> self-contained folders but need to look in back folders?

I think you can add multiple SVN locations to Hudson to do this.



--
Kohsuke Kawaguchi
Sun Microsystems                   [hidden email]

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: I don't understand how to express to hudson how it must use subversion

Dimitris Andreou
O/H Kohsuke Kawaguchi έγραψε:

> Dimitris Andreou wrote:
>> Hi,
>> I have a repository layout like this:
>> /repository/some-file.xml
>> /repository/shared-libs
>> /repository/projectA/trunk/build.xml
>> /repository/projectA/trunk/ <other project files, sources etc>
>>
>> The "repository" folder is the root subversion repository.
>>
>> I'm trying to configure a job for Hudson to build "projectA". But
>> this needs the "some-file.xml" and "shared-libs" folder. How can I do
>> this? If I would do it by hand, I would have a shared (between all
>> project jobs) repository, which would get updated (all of it) before
>> any build.
>>
>> What should I put to "Repository URL" and to "Local module directory
>> (optional)" to at least build it?
>>
>> I tried putting the full URL:
>> "svn://my.ip/repository/projectA/trunk", but obviously, the working
>> copy that is created doesn't see the needed files.
>>
>> If I put only "svn://my.ip/repository/", then it won't find the
>> build.xml, and this would also mean it checkouts the complete
>> repository, possibly for every project job. (But then, I can tell it
>> to do only updates thereafter, but still, can't I share a working
>> copy of the repository?). But the problem is that it wouldn't find
>> build.xml (I haven't tried it, checkout would take too much time).
>
> When you say "it wouldn't find build.xml", I suppose you mean you
> choose Ant as the main builder. In that case I think you can just add
> "-f projectA/trunk/build.xml"
Thanks a lot! Missed that!
>
>> Any ideas?? What is the common practice to do builds are not in
>> self-contained folders but need to look in back folders?
>
> I think you can add multiple SVN locations to Hudson to do this.
Since I can't express somehow that I want only one file from the root
directory, it will check out all of it just because of that. And since
each job get its separate, independent folder, the repositories will be
copied everywhere.

But I think this would be no trouble, and I would be able to share the
hudson's working copy among projects, if only I was able to use ".." in
the "Local module directory". Too bad this is actively forbidden :-(
maybe trust a bit more developers not start shooting themselves? Could
you relax the restriction to, for example, not creating a path outside
of hudson installation directory? That would be fairly safe too... I
just wanted to specify a location for the repository outside of "jobs"
folder, so all jobs see and use the same location.

Anyway, thanks for a great tool!

Dimitris

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