[英]Jenkins Multibranch Pipeline - scan is not triggered from Bitbucket when a PullRequest is created
We have configured Jenkins multibranch pipelines to automatically build feature branches that are filed as Pull request in Bitbucket.我们已经配置了 Jenkins 多分支管道来自动构建功能分支,这些分支在 Bitbucket 中作为拉取请求提交。 For the Webhook creatin in Bitbucket(Server), we use Parametrized Builds for Jenkins.
对于 Bitbucket(Server) 中的 Webhook creatin,我们使用 Jenkins 的参数化构建。 In Jenkins we have successfully configured this, the buildable branches are detected like a charm.
在 Jenkins 中,我们已经成功配置了这个,可构建的分支像魅力一样被检测到。
The thing is that I have to tell Jenkins to check for new branches every 2 Minutes, I'd rather have Jenkins notified when a PR is created,merged or changed.问题是我必须告诉 Jenkins 每 2 分钟检查一次新分支,我宁愿在创建、合并或更改 PR 时通知 Jenkins。 All other notifications from Bitbucket work pretty well, changes in a multibranch build lead to an automatic build, normal builds on none multibranch pipelines also work.
来自 Bitbucket 的所有其他通知都运行良好,多分支构建中的更改导致自动构建,非多分支管道上的正常构建也有效。
Does sombody know why the scan cannot be triggered from Bitbucket?有人知道为什么不能从 Bitbucket 触发扫描吗? I can provide Screenshots of my configuration if someone needs that... Thanks Carsten
如果有人需要,我可以提供我的配置截图...谢谢 Carsten
You'd need to add a corresponding Webhook to each repository in Bitbucket to have builds being triggered on specific actions.您需要将相应的 Webhook 添加到 Bitbucket 中的每个存储库,以便在特定操作上触发构建。 We are using an extra add-on in Bitbucket ( https://marketplace.atlassian.com/apps/1215474/post-webhooks-for-bitbucket?hosting=server&tab=overview ) but you could even use the default Webhook implementation in Bitbucket (described here https://confluence.atlassian.com/bitbucketserver/managing-webhooks-in-bitbucket-server-938025878.html )
我们在 Bitbucket( https://marketplace.atlassian.com/apps/1215474/post-webhooks-for-bitbucket?hosting=server&tab=overview )中使用了一个额外的附加组件,但您甚至可以在 Z39EC4B66BBCED386DF823ZEFEC4B60BBCED386DF823ZEFEC4B60BBCED386DF823ZEF3B60 (此处描述https://confluence.atlassian.com/bitbucketserver/managing-webhooks-in-bitbucket-server-938025878.html )
The endpoint in Jenkins is defined by the Multibranch plugin. Jenkins 中的端点由 Multibranch 插件定义。 It is this one: "YOUR_JENKINS_URL/bitbucket-scmsource-hook/notify"
就是这个:“YOUR_JENKINS_URL/bitbucket-scmsource-hook/notify”
See https://support.cloudbees.com/hc/en-us/articles/115000053051-How-to-Trigger-Multibranch-Jobs-from-BitBucket-Server- for a good guide.有关好的指南,请参阅https://support.cloudbees.com/hc/en-us/articles/115000053051-How-to-Trigger-Multibranch-Jobs-from-BitBucket-Server- 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.