在 Jenkins 项目上设置“包含区域”时,帮助文本提到了这一点:
If set, and Jenkins is set to poll for changes, Jenkins will ignore any files and/or folders that are not in this list when determining if a build needs to be triggered. Each inclusion uses regular expression pattern matching, and must be separated by a new line.
This is useful when you need to check out an entire resource for building, but only want to do the build when a subset has changed.
/trunk/myapp/c/library1/.*
/trunk/myapp/c/library2/.*If /trunk/myapp is checked out, the build will only occur when there are changes to either the c/library1 and c/library2 subtrees. If there are also excluded regions specified, then a file is not ignored when it is in the included list and not in the excluded list.
我仍然不太清楚这个“资源”应该是什么。
假设我 check out 了存储库的一部分:https://svn.mydomain.com/repos/projects/myfancyproject/trunk
让我们也假设我将它检查到一个名为“theproject”的文件夹中
现在,让我们假设我只希望在 repo 的“documents/cat-pictures/”文件夹中发生变化时触发构建。
我应该输入:
甚至:数字 1 到 5 带有“theproject/”前缀
?
最佳答案
如果您的存储库是
https://svn.mydomain.com/repos/projects/myfancyproject/trunk
并且您只想在
documents/cat-pictures
中发生变化时进行构建,您将以下内容添加到您的包含列表中:/trunk/documents/cat-pictures/*
在您的列表中是 1。
在颠覆中,“trunk”、“tags”和“branches”只是文件夹,虽然它们似乎已经成为标准名称,但如果你愿意,它们可以被称为“cats”、“dogs”和“birds”。
您存储库的根目录位于
https://svn.mydomain.com/repos/projects/myfancyproject/
,所以你把 /trunk/documents/cat-pictures
作为您包含的区域。至少这是我的理解。
关于svn - Jenkins 中 SVN "Included Regions"的格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7270885/