2

I have a Hudson project setup, basically "URL of repository" = D:/Development

Say I have a .NET solution under /SomeFolder/SomeProject/SomeProject.sln, how can I get Hudson to monitor the /SomeFolder/SomeProject folder in Git? I am new to git, so should I have a new Git repository for each project? I have used SVN with Hudson and was able to do the above easily, so any help would be greatly appreciated

Regards,

Andrew

andrewjboyd
  • 171
  • 11
  • possible duplicate of [How do you set up Hudson to work with Git?](http://stackoverflow.com/questions/534308/how-do-you-set-up-hudson-to-work-with-git) – hangy Jan 01 '11 at 22:12
  • I did see that... my question is more like, in svn I can have sub folders with multiple solutions/projects and in Hudson I can monitor just 1 sub folder for changes, but I appear not to be able to do this with Git – andrewjboyd Jan 02 '11 at 04:15

1 Answers1

1

The only way I see this kind of setting possible would be to use a parent repo, which would declare each of the repos you want to monitor as submodules.

Hudson might need to be tweaked in order to run a job before your current job, in order to make sure it does the git submodule update properly, before its 'git status' (I haven(t tested this configuration, so maybe this step won't be necessary).

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • Are you able to tell me how you setup your git repo's for Hudson? I ended up setting up a repo for each solution, but would like to know if this is the right way of doing it... Like I said, I am new to git, so I'm just trying to work out best practice, etc – andrewjboyd Jan 03 '11 at 08:13
  • 1
    @andrewjboyd: intuitively, I would say that one repo per solution sounds right (see http://stackoverflow.com/questions/899373/transferring-legacy-code-base-from-cvs-to-distributed-repository-e-g-git-or-mer/899428#899428). If those repos aen't too closely related (i.e. if modifying one doesn't involve modifying *all* the others), then you can group them in a parent repo as submodules. What I don't know is how well Hudson will detect changes in said submodules when only the parent repo is set in the job configuration. – VonC Jan 03 '11 at 08:19
  • This is what I went with and it does handle it (after you check the "{something} submodule" check box) – andrewjboyd Jan 05 '11 at 03:32