![DevOps for Salesforce](https://wfqqreader-1252317822.image.myqcloud.com/cover/357/36699357/b_36699357.jpg)
上QQ阅读APP看书,第一时间看更新
Adding a Jenkins webhook URL in a GitHub project
To add a Jenkins webhook URL, you need to perform the following steps:
- Grab your GitHub webhook URL from Manage Jenkins | Configure System | GitHub Web Hook Section.
Example URL: https://<your-domain-name or IP address>/web-hook/
- Go to GitHub | Choose your project. Go to Settings and select Integrations and Services. Click on Add service and search for Jenkins. As a result, you will see two service: Jenkins (Git plugin) and Jenkins (GitHub plugin). Choose one according to your project. We are going for Jenkins (GitHub plugin):
![](https://epubservercos.yuewen.com/DE9141/19470387701533306/epubprivate/OEBPS/Images/cdc4bc33-6755-49e4-9dbd-5b9b4d6e053f.png?sign=1738922730-cQplgUoJYJu7pT0IYAazxDsVTq4ClRkL-0-b15317eacfb2dbed25f7c575bdf38bd6)
- Add your Jenkins webhook URL and click on Add service:
![](https://epubservercos.yuewen.com/DE9141/19470387701533306/epubprivate/OEBPS/Images/5257dcbf-324d-432f-a2f7-77d944f1bd3c.png?sign=1738922730-equSeBuSiUslF8iMhSW9JqJ6573WyQsI-0-ef4bbbf9a041b798c99b16adaec43766)
- Verify that the hook is working by clicking on Test service. It will send our test payload to the Jenkins server. If everything is working fine, then we will see a green check mark before the Jenkins webhook:
![](https://epubservercos.yuewen.com/DE9141/19470387701533306/epubprivate/OEBPS/Images/44cb59a8-aed2-4325-9bcf-88f06bd84c67.png?sign=1738922730-10hjUXMHhhCoGgDdA0B78wzgu8PihlHC-0-6a04b9d6dd38901a3f32dc8bf95f2e0f)
To test your continuous integration pipeline, add some changes in the README file we created. Push changes to GitHub.
- In Jenkins, you can see the "devops-ci-cd" build is automatically started as shown in the following screenshot:
![](https://epubservercos.yuewen.com/DE9141/19470387701533306/epubprivate/OEBPS/Images/264a1a2c-b0be-4ca8-b036-a7ff2cb42c02.png?sign=1738922730-nCbVHHBoMzi94tD34PPsaWLyeFqlTp72-0-85385c83f2aafc6e5e0e100d7f74dd5a)