0
votes

I have setup Jenkins and integrated with Github, and I am able to trigger builds on "Freestyle Projects" from a github webhook, however I have been unsuccessful in triggering one using the "Pipeline project".

In the logs (/log/all), I can see that my Jenkins instance is receiving the PushEvent from Github:

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/

However it does not "Poke" the project like the "Freestyle" project does. I have checked the Githook hook trigger for the project:

enter image description here

And the pipeline is setup as: enter image description here

After setting it all up, I triggered a manual job which completed successfully, afterwards I comitted and pushed new code to Master, saw the webhook triggering in Github and in the Jenkins Log.

Am I missing a unique step for the Pipeline build?

Running Jenkins v 2.235.4

1
Did you configure the Github plugin in jenkins? Have you defined credentials for Github? - Jose Camacho

1 Answers

1
votes

I checked off the "Lightweight Checkout" in the last section of the Pipeline, ran a manual build which fixed the issue. Builds are now triggered from Github webhook.

enter image description here

I did not have to setup Github Credentials in the Github Plugin to make this work.