版权声明:知识就是为了传播! https://blog.csdn.net/weixin_36171533/article/details/86679090
首先在Gogs设置webhook钩子
每当git push 就会触发通知Jenkins的事件
格式:http://jenkins.xxx.com/git/[email protected]:jesse/zhongfei.git
http://jenkins.xxx.com Jenkins地址
/git/notifyCommit?url= 固定的格式
[email protected]:jesse/zhongfei.git Gogs的仓库地址,注意和Jenkins 的Git设置一直
这样,代码push时就会自动触发构建。