【问题标题】:Jenkins autobuild goes into a loop when github commit triggers the build当 github 提交触发构建时,Jenkins 自动构建进入循环
【发布时间】:2016-01-10 15:19:54
【问题描述】:

我在 jenkins 中创建了一个 webhook 并将其连接到 github webhook & services。

我遇到了以下问题 构建完成后, pom.xml 会使用 version 和 tag 进行更新。这会再次触发构建作业并进入循环,直到我手动停止它。

我已将构建触发器设置为“将更改推送到 GitHub 时构建”

我想了解当 pom.xml 仅作为构建的一部分进行更新时如何停止构建触发器?

【问题讨论】:

    标签: maven github jenkins


    【解决方案1】:

    source code management 作业配置部分添加 Additional Behaviors 并选择 Polling ignores commits from certain users 并提供您的 Jenkins 作业用于签入 pom.xml 的用户名。您也可以使用Polling ignores commits in certain paths 并提供 pom.xml 的路径。

    【讨论】:

      【解决方案2】:

      我建议不要将版本更新提交到主分支,而是每次都创建一个单独的标签。像这样的:

          v1   v2   v3
         /    /    /
      --A----B----C (master)
      

      我从Real-World Strategies for Continuous Delivery with Maven and Jenkins 视频 (corresponding slides) 中获得了这种方法 - 它还包含有关使用 Maven 设置构建管道的其他技巧。

      【讨论】:

        猜你喜欢
        • 2023-03-27
        • 1970-01-01
        • 2015-09-25
        • 2019-09-03
        • 1970-01-01
        • 1970-01-01
        • 2018-09-20
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多