Jenkins:GitHub钩子触发GITScm轮询 [英] Jenkins: GitHub hook trigger for GITScm polling

查看:615
本文介绍了Jenkins:GitHub钩子触发GITScm轮询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试配置Jenkins.我想要一个简单的行为:在新的请求请求上触发构建.

I try to configure Jenkins. I want a simple behavior: trigger a build on new pull request.

因此,我创建了一个作业并对其进行了配置,但是我选中了以下复选框:

So, I created a job and configured it, but I checked the checkbox for:

正如您所见,没有任何东西掉落下来.

And as you can see nothing is dropped down.

如果我单击右侧的问号,则会看到:

If I click the question mark on the right side, I see:

如果jenkins将收到Git SCM中定义的回购中的PUSH GitHub挂钩 部分将触发Git SCM轮询逻辑.所以轮询逻辑在 事实属于Git SCM.

If jenkins will receive PUSH GitHub hook from repo defined in Git SCM section it will trigger Git SCM polling logic. So polling logic in fact belongs to Git SCM.

但是"Git SCM部分"在哪里?

But where is the "Git SCM section"?

推荐答案

您需要在GitHub存储库上配置webhook.然后,在每次提交推送时,Jenkins都会收到通知.

You need to configure the webhook on your GitHub repository. Then, on every commit push, Jenkins will be notified.

因此,在浏览器中打开您的存储库,然后转到Settings > Webhooks并添加一个新存储库.

So, open your repository in the browser, then go to Settings > Webhooks and add a new one.

然后,输入您的Jenkins实例的URL,然后输入/github-webhook,然后根据需要选择其他选项:

Then, enter the URL of your Jenkins instance followed by /github-webhook and select the other options depending on your needs:

这篇关于Jenkins:GitHub钩子触发GITScm轮询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆