【问题标题】:Triggering Multi Branch Pipeline Jenkins job using the git webhook not working使用 git webhook 触发多分支管道 Jenkins 作业不起作用
【发布时间】:2018-03-09 00:35:08
【问题描述】:

我有一个这样配置的多分支管道作业:

还为它配置了轮询:

当新的提交被推送到其配置的 Git 存储库时,在轮询之后,作业会按预期触发。在控制台输出中,Git 存储库记录为 https://stash.example.com/scm/eg/project.git

但是,当我尝试使用 git notifyCommit webhook 触发作业时,我收到以下错误消息:

$ curl 'http://jenkins.example.com/git/notifyCommit?url=https://stash.example.com/scm/eg/project.git'
No git jobs using repository: https://stash.example.com/scm/eg/project.git and branches:
No Git consumers using SCM API plugin for: https://stash.example.com/scm/eg/project.git

这里缺少什么?为什么 Jenkins 找不到任何工作/git 消费者来触发这个 repo?

【问题讨论】:

    标签: jenkins


    【解决方案1】:

    您收到该错误的原因是您在作业配置中使用了 BitBucket 插件,因此您无法获得通知端点以使用 curl 请求触发构建。此外,GitNotify 端点是 Github 插件的一部分,它扫描所有使用 GitPlugin 的作业配置,然后将 curl 请求的 URL 与 git 插件中使用的 URL od repo 交叉匹配。因此,如果您想使用 bitbucket,请遵循 https://mohamicorp.atlassian.net/wiki/spaces/DOC/pages/381419546/Configuring+Webhook+To+Jenkins+for+Bitbucket+Bitbucket+Branch+Source+Plugin 上记录的说明

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多