[英]Triggering Multi Branch Pipeline Jenkins job using the git webhook not working
我有一个多分支管道作业,配置如下:
轮询也为它配置:
当新的提交被推送到其配置的Git仓库时,在轮询之后,将按预期触发Job。 在控制台输出中,Git repo记录为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
这里缺少什么? 为什么詹金斯找不到任何工作/ git消费者为这个回购触发它?
您收到该错误的原因是您在作业配置中使用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+上的说明进行操作。 来源+插件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.