简体   繁体   English

詹金斯(Jenkins)和不同的Bitbucket分支机构

[英]Jenkins and different Bitbucket's branches

I have a bitbucket repo online with a few branches inside. 我在线上有一个Bitbucket存储库,里面有几个分支。 I need to run different jobs on Jenkins by commit. 我需要通过提交在詹金斯上运行不同的工作。 In other words, if I've made a commit in branch A, run a task A will run, but if I've made the commit in branch B, task B will run. 换句话说,如果我在分支A中进行了提交,则运行任务A将运行,但是如果我在分支B中进行了提交,则任务B将运行。

But as far as I know the Bitbucket webhooks can't work by branches, only the repo. 但是据我所知,Bitbucket Webhooks无法按分支机构运行,只能按仓库运行。 How do I solve this? 我该如何解决?

Thank you. 谢谢。

Which Bitbucket plugin are you using? 您正在使用哪个Bitbucket插件? The Parameterized Builds for Jenkins plugin have support to choose the matched branches or tags you want to trigger builds. JenkinsParameterized Builds插件支持选择要触发构建的匹配分支或标签。 It seems you need to have Bitbucket 5 at least to have this feature. 看来您至少需要具备Bitbucket 5才能具有此功能。

See more details here . 在这里查看更多详细信息。

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

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