svn - Jenkins 中 SVN "Included Regions"的格式

标签 svn continuous-integration jenkins

在 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/”文件夹中发生变化时触发构建。

我应该输入:
  • /trunk/documents/cat-pictures/.*
  • /documents/cat-pictures/.*
  • /repos/projects/myfancyproject/trunk/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/

    相关文章:

    svn - 什么会导致 SVN Update 合并错误?

    java - 如何测试消息队列客户端?

    haskell - 如何为 Haskell/stack 创建 travis 脚本?

    jenkins - 没有与此分配匹配的代理/云 - jenkins 错误

    python - python logging模块默认写日志到哪里?

    svn - 如何修复此 Subversion MKCOL 错误?

    svn - 使用提交后钩子(Hook)在 VisualSVN Server 中导出

    svn - 意外删除的SVN标签

    windows - 使用 Windows 批处理命令配置 Jenkins CI 作业和 FreeFileSync 批处理

    linux - 无法允许 jenkins 对 shell 脚本进行 sudo 访问