You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

JFrog Pipelines每次发布触发两次运行的原因排查

JFrog Pipelines GitRepo资源重复触发运行问题分析

用户配置的GitRepo资源

name: ExtBuildInfo_ReleaseGitRepo
type: GitRepo
configuration:
  gitProvider: Github
  path: myrepo/ext-build-info
  tags:
    include: ^v.*$
  buildOn:
    commit: false
    tagCreate: true
  cancelPendingRuns:
    newCommit: true

两次运行排队的原因

  1. GitHub事件双重触发:在GitHub上创建新版本(打tag)时,会同时生成两个事件——tag创建事件和该tag关联的commit推送事件。即便设置了buildOn.commit: false,JFrog Pipelines仍可能捕获到tag绑定的commit推送事件,尤其是当tag指向的是新提交的commit时,就会触发两次运行。
  2. Webhook事件订阅冗余:如果GitHub仓库的webhook同时订阅了Create(对应tag创建)和Push事件,而Pipelines没有对commit事件做精准过滤,就会导致两种事件都触发运行。

配置的缺失与修正

当前配置存在过滤不彻底的问题,仅靠buildOn.commit: false无法完全屏蔽tag关联的commit触发。可以通过以下调整解决:

修正后的配置

name: ExtBuildInfo_ReleaseGitRepo
type: GitRepo
configuration:
  gitProvider: Github
  path: myrepo/ext-build-info
  tags:
    include: ^v.*$
  commits:
    exclude: .* # 明确排除所有commit事件触发
  buildOn:
    commit: false
    tagCreate: true
  cancelPendingRuns:
    newCommit: true
    newTag: true # 新增:有新tag时取消pending的运行

调整说明

  • 添加commits.exclude: .*,直接排除所有commit相关的触发请求,确保只有tag创建事件能触发运行。
  • 新增cancelPendingRuns.newTag: true,当有新的tag创建时,自动取消之前处于pending状态的运行,避免重复排队。

内容的提问来源于stack exchange,提问作者Gyana Ranjan Panigrahi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 15:30:51