詹金斯没有在成功的github webhook上触发管道构建

问题描述

我已经设置了Jenkins并与Github集成,并且能够从github Webhook触发“ Freestyle Projects”上的构建,但是我未能使用“ Pipeline项目”触发一个

在日志(/ log / all)中,我可以看到我的Jenkins实例正在从Github接收PushEvent:

Aug 17,2020 8:29:43 PM INFO org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEvent
Received PushEvent for https://github.com/xxx/xxx from 140.82.115.243 ⇒ https://xip.io:9090/github-webhook/

但是,它不会像“ Freestyle”项目那样“戳”项目。 我已经检查了项目的Githook挂钩触发器:

enter image description here

并且管道设置为:

enter image description here

全部设置完成后,我触发了一个手动作业,该作业成功完成,然后我将新代码提交并推送给Master,并在Github和Jenkins日志中看到了Webhook触发。

我是否缺少管道构建的独特步骤?

运行Jenkins v 2.235.4

解决方法

我在管道的最后部分中选中了“轻型结帐”,并运行了一个手动构建版本,以解决此问题。现在可以从Github Webhook触发构建。

enter image description here

我不必在Github插件中设置Github凭据即可完成这项工作。