I'm using Hudson CI for my project. H开发者_StackOverflowowever i faced a problem. Hope someone can guide me...
I want to check out some code from SVN by using Hudson CI. However i want to select certain folders to be check out only. I tried " Excluded Regions" provided in Hudson advanced settings...
Like said i want to filter folder "folderA". i don't want this folder check out from svn when i hit build link at Hudson. Therefore i write "folderA" at the excluded regions text field. But it doesn't work.
Anyone knows why it does not work?
Thanks!
Excluded regions determines what constitutes a change, i.e. a change in an excluded region will not trigger a build. the entire source tree is always checked out (starting from the root you specified).
TLDR; Look at a change under a recent build and see what relative path Jenkins is using for your repository.
I wanted to ignore all changes to files and folders under http://server/svn/MyProjectName/trunk/src/folder/
I looked under Changes in one of the most recent builds and it showed a change was made to /MyProjectName/trunk/src/folder/filename.txt
So to exclude all files and folders under /MyProjectName/trunk/src/folder/ I put /MyProjectName/trunk/src/folder/.*
Hope this helps anyone else that has had trouble.
Instead of telling what Hudson should not check out, you can also configure what Hudson should check out (add another subversion location). Of course this only works if you want to eliminate one of the top level folders.
e.g.
- Project
- subproject 1
- subproject 1.1
- subproject 1.2
- subproject 2
- subproject 3
- subproject 4
- subproject 1
So you can elemintate the whole subproject 1 but not subproject 1.1 if there are files in subproject1.
This gets pretty messy though when you have many subprojects. I am not sure for what SCMs it will work, however, it can be done with subversion.
Usually I would try to avoid checking code out from subversion myself, since you will loose the change detection provided by Hudson. Without change detection, you have only the periodic build as an option, meaning it builds regardless if there are changes in your project or not.
精彩评论