gpt4 book ai didi

teamcity - 仅在更改作业 scm 文件夹中的特定子文件夹时触发 Jenkins 作业

转载 作者:行者123 更新时间:2023-12-02 21:27:22 41 4
gpt4 key购买 nike

我正在将持续集成系统从 Teamcity 迁移到 Jenkins。我们的所有项目都有一个 svn 存储库,如下所示:

project/dev_db_build (folder)
project/module1 (folder)
project/module2 (folder)
projets/pom.xml

为了在 CI 服务器上构建数据库,我使用 url project/dev_db_build 并可以轮询此 url 以在发生更改时触发构建。

对于构建应用程序,我使用 url project/因此,如果我轮询它并且对 dev_db_build 进行了更改,则应忽略并在 db_build 成功后触发应用程序构建。

在 teamcty 中,我为此使用了“触发模式”。但Jenkins中触发插件非常多https://wiki.jenkins-ci.org/display/JENKINS/Plugins#Plugins-Buildtriggers - 我研究了其中一些,但没有找到合适的。

最佳答案

理想情况下,您应该按照@Mike的建议使用提交后 Hook ,而不是轮询。否则,在配置 Jenkins 作业时,在选择“Subversion”的“源代码管理”下,有一个高级按钮。单击此按钮会显示许多选项,包括“排除区域”

If set, and Jenkins is set to poll for changes, Jenkins will ignore any files and/or folders in this list when determining if a build needs to be triggered. Each exclusion uses regular expression pattern matching, and must be separated by a new line.

/trunk/myapp/src/main/web/.*.html

/trunk/myapp/src/main/web/.*.jpeg

/trunk/myapp/src/main/web/.*.gif

The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur. More information on regular expressions can be found here.

就您而言,您可以将“排除区域”设置为类似

/project/dev_db_build/.*

关于teamcity - 仅在更改作业 scm 文件夹中的特定子文件夹时触发 Jenkins 作业,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8037954/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com