【问题标题】:Issue while triggering jenkins pipeline using github webhooks for specific branch使用 github webhooks 为特定分支触发 jenkins 管道时出现问题
【发布时间】:2019-12-06 10:01:35
【问题描述】:

尝试使用 Github webhooks 为特定分支触发 Jenkins 管道。管道应触发合并提交,但在触发时存在问题。尝试使用“通用 Webhook Trigger”插件。

如果我在可选过滤器中使用 ^(refs/heads/release-1.0)$ 并且每当某些内容合并到 release-1.0 分支并且管道构建成功时就会触发管道

但是当我在可选过滤器中使用 ^(refs/heads/release-)$ 时,管道没有触发。 这里我使用 release- 的原因是发布分支有标签号。例如:release-1.0、release-1.1、release-1.2等等。

谁能帮我解答这个问题。

【问题讨论】:

    标签: jenkins github continuous-integration git-webhooks


    【解决方案1】:

    ^(refs/heads/release-)$ 是一个正则表达式,以 (^) 开头,以 ($) 结尾,包含特定文本 refs/heads/release-

    您需要扩展正则表达式模式匹配,例如:.*[0-9]*\.[0-9]*,这里:release-{here}

    来自README.md

    这个regexp 网站还有语法here

    【讨论】:

      猜你喜欢
      • 2019-09-14
      • 1970-01-01
      • 2020-08-24
      • 2021-10-03
      • 2022-08-11
      • 1970-01-01
      • 2022-06-16
      • 1970-01-01
      • 2017-06-23
      相关资源
      最近更新 更多