问题
I installed CCNET to make autobuild from a GIT server. I have a big problem here : My Git Server Repo Structure :
Repo.git
--- Module 1(Folder 1)
--- Module 2(Folder 2)
--- Module 3(Folder 3)
--- Module 4(Folder 4)
--- Module 5(Folder 5)
--- Module 6(Folder 6)
The ccnet make trigger follow by the order Mod1 - > Mod2 - > Mod3 - > Mod4 - > Mod5 - > Mod6
but when CCNET trigger a changes anywhere(Maybe changes make in Folder 5(Module 5)), its still make a build as above order. I dont want to do this, It will take a lot of time. I just want to make build which module has been changed. Somebody please help me to make ccnet do this way. Thanks for yours reading.
回答1:
In Git, if you have several directories that are always checked out independently, then these are really two different projects and should live in two different repositories. You can merge them back together at a later point using Git Submodules
An alternative approach you can use Modification Writer Task. This tasks writes to an XML file, which can be evaluated from build script or batch file. Based on this you can do your build.
回答2:
the answer from @domu904 is correct.
But if you do not want to change your project structure you can try to use the Filtered Source Control.
With the Filtered Source Control you're abel to specify include and exclude filter rules for CCNet to detect modifications.
So you can include just the specific git module folder in your module ccnet project.
To trigger the dependend module ccnet projects use the Project Trigger.
来源:https://stackoverflow.com/questions/15942163/git-source-control-make-trigger-when-files-are-changed-in-a-folder