博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
配置gitlab的web hook,当git库的某个分支有提交时,自动触发jenkins的job
阅读量:6911 次
发布时间:2019-06-27

本文共 918 字,大约阅读时间需要 3 分钟。

hot3.png

jenkins是一个CI工具,其有个插件gitlab hook plugin,可以识别gitlab发送过来的提交信息,并触发对应的job。

配置功能:

  • jenkins上只需要配置源代码来自git地址,不需要任何额外的配置;
  • 在gitlab的某个项目的web hook配置中,配置固定的触发地址:
  • 当gitlab的指定项目有push后,当push完成时,会触发指定的jenkins server上的对应job,匹配原则为:git project url地址一致,branch一致;

Build now hook

Add this web hook on your GitLab project:

http://your-jenkins-server/gitlab/build_now

Plugin will parse the GitLab payload and extract the branch for which the commit is being pushed and changes made. It will then scan all Git projects in Jenkins and start the build for those that:

  • match url of the GitLab repo
  • match the configured refspec pattern if any
  • and match committed GitLab branch

Notes:

  • for branch comparison, it will take into account both the branch definition and the strategy (this is different from the original notifyCommit)
  • the project must be enabled
  • you don't have to setup polling for the project

转载于:https://my.oschina.net/jdragon/blog/491071

你可能感兴趣的文章
那些年我们一起追逐的多线程(Thread、ThreadPool、委托异步调用、Task/TaskFactory、Parallerl、async和await)...
查看>>
测试DOM0级事件和DOM2级事件的堆叠
查看>>
违章查询源码分享
查看>>
mac终端下svn常用命令
查看>>
C++的lambda表达式
查看>>
新手学习python(十六)封装redis
查看>>
vue移动端弹框组件
查看>>
vuex
查看>>
vux 全局使用 loading / toast / alert
查看>>
面向对象数组操作
查看>>
【杂题】[LibreOJ #6608] 无意识的石子堆【容斥原理】【FFT】
查看>>
jq与原生js实现收起展开效果
查看>>
JS开发中自定义调试信息开关
查看>>
p3302 [SDOI2013]森林(树上主席树+启发式合并)
查看>>
我的 FPGA 学习历程(06)—— 二进制转格雷码
查看>>
书摘<<互联网世界观>>
查看>>
Running Intel® HAXM installer
查看>>
pycharm 不显示代码提示
查看>>
基础数据库脚本12年编写
查看>>
开启新线程
查看>>