Bret Hess
Bret Hess

Reputation: 503

Jenkins not building after push, but Github webhook is working

I think I've done the hard part already: the Github webhook after a push always returns a success message.

I can build manually. But it never builds after the push, because "polling" never happens.

Both the GitHub Hook Log and Git Polling Log say "Polling has not yet run".

Here is my configuration:

Any ideas on how to get the polling started?

A side question: which should be doing the polling when I'm using the webhook in github: the "GITScm polling" or "Poll SCM"? Can I delete one of those settings?

Triggers and build

Upvotes: 6

Views: 6058

Answers (2)

mirekphd
mirekphd

Reputation: 6791

It's enough to keep only GitHub hook trigger for GITScm polling on, because this is the right option for conditional triggers (following git push as opposed to scheduled as a cron job, i.e. proper polling 1).

As for ideas on how to get the triggering (not polling) started, consult my "pre-flight checklist" here, because it's not a trivial matter.


Side note: feel free to report it to the Jenkins Github Plugin devs if you also think that the word "polling" is misplaced in this option (as per the definition of this term).

Upvotes: 0

Dibakar Aditya
Dibakar Aditya

Reputation: 4203

Poll SCM is to scan the repository for changes at regular intervals as specified by the cron under Schedule. So this option is redundant.

Now coming to the hook, is it configured to deliver everything or just the push event? You can hit http://<jenkins_url>/log/all in your browser to see the system log while pushing changes. Towards the bottom of this log, see if Jenkins has received the hook and poked the job. If the hook is not received, reconfigure it at GitHub to send the appropriate events. Else, delete and recreate the job as sometimes Jenkins fails to register a new job to poke on receiving events and at other times a new job itself doesn’t respond to poking.

Upvotes: 4

Related Questions