elvanja / jenkins-gitlab-hook-plugin

Enables Gitlab web hooks to be used to trigger SMC polling on Gitlab projects
142 stars 81 forks source link

应该如何正确填写回调URL,我按照文档书写的地址一致验证不过 #74

Open paintingStyle opened 7 years ago

paintingStyle commented 7 years ago

如何拼接正确的URL,在你新版的插件中只用勾选选项,没有提示回调URL,使用gitlab的webHook功能的URL应该如何填写,麻烦详细说明。

下面是gitlab配置的URL列子,没有一个成功的

http://192.168.91.16:8080/gitlab/build_now Push Events SSL Verification: enabled Edit Test Remove http://192.168.91.16:8080/job/tyfocgApp/ Push Events SSL Verification: enabled Edit Test Remove http://192.168.91.16:8080/job/tyfocgApp/git/notifyCommit?url=git@gitlab.com:rzj/tyfocgApp.git Push Events SSL Verification: enabled Edit Test Remove http://192.168.91.16:8080/git/notifyCommit?url=git@gitlab.com:rzj/tyfocgApp.git Push Events SSL Verification: enabled Edit Test Remove http://192.168.91.16:8080/job/tyfocgApp//git/notifyCommit?url=git@gitlab.com:rzj/tyfocgApp.git Push Events

jiangchao0304 commented 6 years ago

like this : http://192.168.91.16:8080/gitlab/build_now/projectName

FantasyWind2016 commented 6 years ago

@jiangchao0304 这个写法windows版的jenkins也可以用吗,我设置了之后无法触发构建。

Shiyanping commented 5 years ago

like this : http://192.168.91.16:8080/gitlab/build_now/projectName

如果是文件夹下面的工程该怎么配置呢,使用 http://192.168.91.16:8080/gitlab/build_now/文件夹/project 并不对

Shiyanping commented 5 years ago

我解决这个问题了,其实还是找到 jenkins 里你的工程,然后配置项里不是配置了 gitlab 的钩子吗?有一项是Build when a change is pushed to GitLab. GitLab webhook URL: XX,把这个url拷贝上,端口号改成你自己jenkins的端口号(因为他提供的是8080,我们可能自己会修改端口号),然后在下边的高级设置里有一个 Filter branches by name 或者 Filter branches by regex,把要根据哪个分支构建加上,然后把上面的 URL 配置到gitlab上就可以了。可以参考我写的一篇博客 https://juejin.im/post/5d3fb5046fb9a06b0935f47d