【问题标题】:Two runs being triggered in JFrog Pipelines for every release每次发布都会在 JFrog Pipelines 中触发两次运行
【发布时间】:2023-02-09 07:30:28
【问题描述】:

我有以下 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

当我在 Github 中创建一个新版本时,我看到有两个运行正在排队等待管道。为什么是这样?上面是否缺少任何配置?

【问题讨论】:

    标签: jfrog-pipelines


    【解决方案1】:

    在 GitHub 中,创建一个版本会发送两个 webhook。一个钩子代表“释放”动作,一个代表“标记”动作。 GitRepo 资源支持这两种操作。

    通常,要对两个 webhook 做出反应,您需要启用两个设置:

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

    启用这两个标志可能是创建发布时双重触发的常见来源。

    在您的情况下,我发现您的 yaml 中没有“releaseCreate: true”。在这种情况下,我建议您检查 GitHub 存储库设置,看看您是否配置了 2 个可能导致重复触发器的不同 webhook。如果您有两个,我建议您删除其中一个以避免重复触发。

    这是 GitRepo 资源的完整文档:https://www.jfrog.com/confluence/display/JFROG/GitRepo

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-02-13
      • 2016-06-29
      • 1970-01-01
      • 2020-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多