javydreamercsw
javydreamercsw

Reputation: 5089

Hudson: Multiple Jobs on same repository

It looks like How can I setup Hudson to use the same repository for different projects and maintain separate change logs? but is not.

In my case the scenario is a little bit different:

Trunk

-----Project 1

-----Project 2

-----Project 3

-----Common Libraries

Common Libraries contains shared libraries among the projects. Right now I'm setting each project a separate job for the same reasons: independent reporting (java doc, test results, etc)

Is there a way to prevent each job have their own cop of the repository (checked out from SCM)?

I guess I can zip the repository and extract in the next project but I hope there's something else in place. I doubt this is an unique setup.

Upvotes: 1

Views: 1222

Answers (3)

Peter Schuetze
Peter Schuetze

Reputation: 16305

Only checkout what is used by each project, so that you only have multiples of the libraries, but not the projects. If you use Subversion, you can add as many subversion locations as you want to without the multiple scm plugin. In one job I have almost 20 different locations.

How to configure more locations?
Configure the first location. On the right side of the page (between "Local module directory (optional)" and "Check-out Strategy") there is a button "Add more locations ..." This will give you another "Repository URL" field to enter a second location. I am using Jenkins 1.421 and Subversion 1.28

Upvotes: 1

javydreamercsw
javydreamercsw

Reputation: 5089

After giving it some thought I think the best approach is using the multi SCM Hudson plug-in and checkout Project 1 and the common libraries only and so on.

Upvotes: 0

Peter Schuetze
Peter Schuetze

Reputation: 16305

you can have a common workspace for all three job's. If you only need to use the common libraries and not build them, you should be fine as long as you have build specific information (and all the temporary files, ....) for each job in the project (or separate) folder. However, I don't know if it can come to conflicts when two jobs checkout/update code at the same time.

Since HDD space is inexpensive I would give each job it's own space (including it's own common libraries). If you are concerned about overloading the svn server, than just run an update instead of complete checkout.

Upvotes: 1

Related Questions