简体   繁体   English

通过推送到GitLab上的特定分支来触发Jenkins构建

[英]Trigger Jenkins build via push to a specific branch on GitLab

If there is the way to trigger Jenkins build via push to a specific branch on GitLab. 如果有方法通过推送到GitLab上的特定分支来触发Jenkins构建。 At this moment I am using GitLab webhooks integration, to run a specific job? 此刻我正在使用GitLab webhooks集成,运行一个特定的工作? Now it starts after the push to any branch, but I need to start a job from push to the specific branch. 现在它在推送到任何分支后开始,但我需要从推送到特定分支开始工作。

从Gitlab 11.3开始就可以了( https://about.gitlab.com/2018/09/22/gitlab-11-3-released/

Does not appear to be possible currently by selecting a branch in the GitLab webhook. 目前似乎无法通过在GitLab webhook中选择分支来实现。 Feel free to watch progress on this new feature in the GitLab issue Filter web hooks by branch . 随意在GitLab问题中观看此新功能的进度过滤网络分支挂钩

I did note in the issue comments the following that might help you configure things via Jenkins: 我在问题评论中注意到以下内容可能有助于您通过Jenkins配置内容:

Jenkins GitLab plugin has an option to filter WebHooks by branch. Jenkins GitLab插件有一个按分支过滤WebHooks的选项。 Under Build Triggers --> Build when a change is pushed to GitLab --> Advanced... Build Triggers --> Build when a change is pushed to GitLab --> Advanced...

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

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