1、Jenkins job中勾选Build when a change is pushed to GitLab

通过gitlab的webhook触发Jenkins自动构建设置

通过gitlab的webhook触发Jenkins自动构建设置

2、Gitlab project 页面setting选择Integrations,配置webhook(将红框“1”中内容填入红框“2”中)

通过gitlab的webhook触发Jenkins自动构建设置

通过gitlab的webhook触发Jenkins自动构建设置

3、配置分支过滤,点击(“高级”)

通过gitlab的webhook触发Jenkins自动构建设置

通过gitlab的webhook触发Jenkins自动构建设置

 

4、测试配置

通过gitlab的webhook触发Jenkins自动构建设置

通过gitlab的webhook触发Jenkins自动构建设置

5、配置成功(如果做了分支过滤,这里不生效)

Gitlab界面返回success

通过gitlab的webhook触发Jenkins自动构建设置

通过gitlab的webhook触发Jenkins自动构建设置

Jenkins job被触发构建

通过gitlab的webhook触发Jenkins自动构建设置

相关文章: