简体   繁体   English

为开发分支上的每个提交触发 Jenkins 构建

[英]Trigger Jenkins build for each commit on develop branch

I build a freestyle jenkins pipeline that executes sonarqube scanner on develop branch and sends slack notification after the build finishes with the results, when I build the pipeline manually it works as expected.我构建了一个自由式 jenkins 管道,该管道在开发分支上执行 sonarqube 扫描仪,并在构建完成后发送松弛通知,当我手动构建管道时,它按预期工作。

I used Bitbucket Plugin to trigger the build after each commit, but it's only working after I changed the pipeline to track the master branch instead, and the pipeline is not triggered on develop automatically.我使用 Bitbucket 插件在每次提交后触发构建,但它仅在我更改管道以跟踪主分支后才起作用,并且管道不会在自动开发时触发。 I don't know where's the problem exactly.我不知道问题到底出在哪里。

I'm using ssh access key to connect to my private bitbucket repository, and my webhook is returning 200, thanks for your help.我正在使用 ssh 访问密钥连接到我的私有 bitbucket 存储库,我的 webhook 返回 200,感谢您的帮助。

Source Code Management源代码管理源代码管理

Build建造建造

Build Triggers构建触发器构建触发器

Bitbucket WebHook Bitbucket WebHook Bitbucket WebHook 1 Bitbucket WebHook 2

solved using generic-webhook-trigger https://link.medium.com/NaDci1Hfvfb使用 generic-webhook-trigger https://link.medium.com/NaDci1Hfvfb 解决

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

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