Re: Question about Git plug-in for Hudson

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

Re: Question about Git plug-in for Hudson

Nigel Magnay
Hi,

I don't really do that much work on the plugin these days due to time constraints; there are a few changes being made by other people though.

My preferred solution for building a project that used 2 repositories would be to combine those repositories into a super-project where repo1 and repo2 were git submodules; that way the SHA1s of of the repositories being built would be trackable and auditable (so the build is still re-createable).

Unfortunately, the git submodule support doesn't have a 'point to latest version in branch X', so to make it work in the way most people would want would require a fair bit of extra UI (e.g what if repo1 should be on 'master', and repo2 should be on 'maint').

The best way I can think of doing this is as follows:

- Create a git repository somewhere to store the superproject.
- Create a free-style project that is scheduled regularly (e.g every minute). In this project have a (bash / .bat) script that updates a git superproject that refers to the two subprojects that are needed (e.g: git submodule fetch; git submodule update) and then pushes the change back to the git repository. (I can't remember the exact git commands however!)
- Make your main project use the superproject git repository - when it checks out, it should have everything in the right places.

HTH,
Nigel



On Tue, Jul 20, 2010 at 5:01 PM, Bill Littman <[hidden email]> wrote:
Sorry to impose on you, but I have a quick question about the Git plug-in for Hudson that you (used to?) maintain.

Back in version 0.4 you worked on the issue: "Allow multiple GIT repositories to be specified". I am trying build 2 repos under the Hudson workspace, one in .../workspace/repo1 and the other in .../workspace/repo2.

Is this possible using the Git plug-in for Hudson? If so, could you briefly describe how or point me towards some docs.

Thanks in advance for your time.

-Bill Littman

Reply | Threaded
Open this post in threaded view
|

Re: multi module jobs (was Question about Git plug-in for Hudson)

Jan Ruzicka
Hi,

The thread Question about Git plug-in for Hudson reminds me a feature that used to be in starteam plugin.
There was option to add a map of repository projects/paths to workspace locations.
It was just complicating use of the starteam plugin and was dropped.

I see that there may be a place for a super-project (a multi module job).
The multi module would use two or more jobs for creating a workspace.
This way portions of code can reside in different repositories even completely independent providers (i.e. mix of cvs, svn, git).

What do you think about this idea?
I see some issues right away:
 1) sharing of the workspace 
 2) a need to specify workspace locations for individual projects (like SVN's Local module directory)
 3) a need for all sub modules to be build on the same slave

My contrived example would be a project that has main program and test code.
The main code and test code are in separate repositories, but the code is closely coupled.
The repositories are separate because developers and tester are separated within organization.

Jan

On Jul 21, 2010, at 4:14 AM, Nigel Magnay wrote:

Hi,

I don't really do that much work on the plugin these days due to time constraints; there are a few changes being made by other people though.

My preferred solution for building a project that used 2 repositories would be to combine those repositories into a super-project where repo1 and repo2 were git submodules; that way the SHA1s of of the repositories being built would be trackable and auditable (so the build is still re-createable).

Unfortunately, the git submodule support doesn't have a 'point to latest version in branch X', so to make it work in the way most people would want would require a fair bit of extra UI (e.g what if repo1 should be on 'master', and repo2 should be on 'maint').

The best way I can think of doing this is as follows:

- Create a git repository somewhere to store the superproject.
- Create a free-style project that is scheduled regularly (e.g every minute). In this project have a (bash / .bat) script that updates a git superproject that refers to the two subprojects that are needed (e.g: git submodule fetch; git submodule update) and then pushes the change back to the git repository. (I can't remember the exact git commands however!)
- Make your main project use the superproject git repository - when it checks out, it should have everything in the right places.

HTH,
Nigel



On Tue, Jul 20, 2010 at 5:01 PM, Bill Littman <[hidden email]> wrote:
Sorry to impose on you, but I have a quick question about the Git plug-in for Hudson that you (used to?) maintain.

Back in version 0.4 you worked on the issue: "Allow multiple GIT repositories to be specified". I am trying build 2 repos under the Hudson workspace, one in .../workspace/repo1 and the other in .../workspace/repo2.

Is this possible using the Git plug-in for Hudson? If so, could you briefly describe how or point me towards some docs.

Thanks in advance for your time.

-Bill Littman


Jan Ruzicka
Senior Software Engineer
Comtech Mobile Datacom Corporation
20430 Century Blvd, Germantown, MD 20874
Office: 240-686-3300
Fax: 240-686-3301
 
The information contained in this message may be privileged and/or confidential. If you are not the intended recipient, or responsible for delivering this message to the intended recipient, any review, forwarding, dissemination, distribution or copying of this communication or any attachment(s) is strictly prohibited. If you have received this message in error, please so notify the sender immediately, and delete it and all attachments from your computer and network.