简体   繁体   中英

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:

  • Branches to build: refs/heads/checkJenkins
  • Build Triggers: GitHub hook trigger for GITScm polling, Poll SCM
  • Build: Execute shell: 'git pull'

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?

触发器和构建

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM