简体   繁体   中英

Searching how to git pull in jenkins and how to make a webhook

Like the question says, I was wondering how to get my repo changes in my jenkins workspace and after many researchs, I found that, apparently it is linked with a github webhook and we can also manage builds with that. But with that comes a second problem : I have the git plugin and the github plugin but, in my "configure system" page, I have no way to configure a github webhook...

Any idea of where the problem could be ?

Thanks

You have to configure the Jenkins job's SCM settings to enable Jenkins to pull from GitHub, and make sure your credentials or SSH keys are configured properly.

You have four main choices for triggering the jobs, however.

  1. Manually trigger the job when you want it to build.
  2. Schedule the job to build periodically (say every night), whether there has been a change in the repository or not.
  3. Poll the repository for changes and build it if there are.
  4. Configure a webhook in GitHub to notify Jenkins when a change has been pushed to the repository.

The fourth option is probably what you want. See the section Push notification from repository of the Git Plugin Wiki page for information about option 4.

Okay, after about one day, I finally found my answers!

To pull data in jenkins, you simply have to launch a build! It is not linked to the github webhook, that is used to automatically launch builds when data is pushed on a repository (and is a hell to configure)

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