简体   繁体   English

Jenkins 使用 webhook 触发多分支管道作业

[英]Jenkins trigger multibranch pipeline job with webhook

I am new into Jenkins and I've been struggling with the following issue: I want to configure automated builds for a bitbucket repository in Jenkins when source code is pushed in any repository branch.我是 Jenkins 的新手,我一直在努力解决以下问题:当源代码被推送到任何存储库分支时,我想在 Jenkins 中为 bitbucket 存储库配置自动构建。 For this, I configured multibranch pipeline for a repository in Jenkins and also a webhook in bitbucket which should trigger the job.为此,我为 Jenkins 中的存储库配置了多分支管道,并在 bitbucket 中配置了一个应该触发作业的 webhook。 However, I've been struggling with connecting this webhook with my multibranch pipeline.但是,我一直在努力将这个 webhook 与我的多分支管道连接起来。 In multibranch pipeline there is no setting for webhook, only to scan "Periodically if not otherwise run".在多分支管道中,没有 webhook 设置,只能扫描“如果不以其他方式运行,则定期”。

Triggering a specific branch build (or at least to scan entire multibranch repo and detecting branches which were pushed) by a webhook seems like a relatively common use case to me, so I suppose this should be somehow possible, can someone please enlighten me on what am I doing wrong?通过 webhook 触发特定的分支构建(或至少扫描整个多分支存储库并检测推送的分支)对我来说似乎是一个相对常见的用例,所以我想这应该是可能的,有人可以请教我什么我做错了吗?

Did you install the Bitbucket Plugin?您是否安装了 Bitbucket 插件? If you have installed it you should see the option "Build when a change is pushed to BitBucket" under "Build triggers"如果您已经安装了它,您应该在“构建触发器”下看到选项“在将更改推送到 BitBucket 时构建”

Bitbucket build trigger Bitbucket 构建触发器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM