Using Jenkins v2.401.2
Am using Github jenkins plugin (comes with Jenkins) to manually configure a webhook and have it run on every action thus triggering my Jenkins job.
Getting: POST /github-webhook/ 200 OK
when an action is triggered on Github, however the Jenkins pipeline doesn't trigger.
On Jenkins side:
GitHub hook trigger for GITScm polling
Github project
and specified the URL to my projectStill don't see the Jenkins pipeline being triggered. Am setting the webhook via Manual Mode
EDIT
This triggers for freestyle project when selecting the appropriate checkboxes but does not work for pipeline project.
I use multibranch pipeline and I don't have this problem, but if I change to pipeline I have the same behaviour.
After some tries, and check the plugin code and this issue seems that to solve the issue you have to follow these steps (I suppose that webhooks part is well configured):
qa_payload-jenkins
.properties([pipelineTriggers([githubPush()])])
node {
git credentialsId: 'b8d10285-xxxx-xxxx-xxxx-xxxxx',
url: 'https://github.com/ConsorciAOC-PRJ/qa_payload-jenkins.git', branch: 'main'
}
NOTE: I tested using credentialsId
but you can use the autenticathion mechanism you prefer. Until git is not correct authenticated the push triggered and the job will not be registered.