Answers: <p>I would use the webhooks GitHub provides if you don't need something specific from Jenkins (Jenkins is in many cases a consumer of GitHub events/webhooks).</p>
  <p><a href="https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#push" rel="nofollow noreferrer">https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#push</a></p>
  <p>Using this webhook you could inspect each payload for specific parameters (ref, repo, etc...) and do something (like pull) if those parameters are met. In either case, you will need a service that can process the webhook/payload and perform the work/automation.</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-05-12T00:38:40.060Z
Answers: 2021-05-12T00:38:40.060Z
Answers: casey vega
Body: <p>I am new to DevOps and am currently designing a CI/CD pipeline that involves integrating GitHub webhooks with Jenkins in a Kubernetes environment, and I would like to see whether this is feasible or not.</p>
  <p>Currently, I have a GitHub repository setup with some code. In Kubernetes, we have a volume setup where we plan to clone said repository into this volume. This repository will need to be up-to-date at all times, but we shouldn't manually update this repository every time a change is made. With Jenkins, we want to setup webhooks in GitHub so any time changes made in the code repository will be updated in the volume.</p>
  <p>I am still new to the idea of webhooks and Jenkins will interact in a Kubernetes environment, specifically a volume, so any thoughts and comments would be appreciated.</p>
  <p>Thanks in advance!</p>
  
Tags: <jenkins><kubernetes><cicd><github>
Title: Jenkins and Kubernetes Design Involving GitHub
UserDisplayName: Bosies
ThreadText: # Jenkins and Kubernetes Design Involving GitHub
  
  (Asked by: username_0 on 2021-04-06)
  
  I am new to DevOps and am currently designing a CI/CD pipeline that involves integrating GitHub webhooks with Jenkins in a Kubernetes environment, and I would like to see whether this is feasible or not.
  
  Currently, I have a GitHub repository setup with some code. In Kubernetes, we have a volume setup where we plan to clone said repository into this volume. This repository will need to be up-to-date at all times, but we shouldn't manually update this repository every time a change is made. With Jenkins, we want to setup webhooks in GitHub so any time changes made in the code repository will be updated in the volume.
  
  I am still new to the idea of webhooks and Jenkins will interact in a Kubernetes environment, specifically a volume, so any thoughts and comments would be appreciated.
  
  Thanks in advance!
  
  **Tags:** jenkins, kubernetes, cicd, github
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-05-12. Score: 1
  
  I would use the webhooks GitHub provides if you don't need something specific from Jenkins (Jenkins is in many cases a consumer of GitHub events/webhooks).
  
  <https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#push>
  
  Using this webhook you could inspect each payload for specific parameters (ref, repo, etc...) and do something (like pull) if those parameters are met. In either case, you will need a service that can process the webhook/payload and perform the work/automation.
  
  
  ---
  
  