patternMinor
PRs not automatically getting trigger in Jenkins github organization
Viewed 0 times
triggerjenkinsautomaticallygithubgettingprsnotorganization
Problem
We are using Github for source control and Jenkins for our builds.
In Jenkins, we are using GitHub Organization Folder plugin along with Multibranch pipeline plugin. This causes the repository to show up in Jenkins, and each repository has a Jenkinsfile in it. And each PR(in github) has a status check, which checks if the build of the PR is good or not.
Everything works fine, except for the fact that once a PR is opened or updated, the PR is not built in Jenkins automatically. You have to manually go to Jenkins and trigger the PR build.
As far as master branch is concerned, it works like a charm. If the master branch is updated, Jenkins automatically triggers the build.
I have attached the screen shot of the branch configuration in Jenkins for the GitHub Organization.
So my question is what should be done for PR opening or updating, that would cause Jenkins to start build automatically.
In Jenkins, we are using GitHub Organization Folder plugin along with Multibranch pipeline plugin. This causes the repository to show up in Jenkins, and each repository has a Jenkinsfile in it. And each PR(in github) has a status check, which checks if the build of the PR is good or not.
Everything works fine, except for the fact that once a PR is opened or updated, the PR is not built in Jenkins automatically. You have to manually go to Jenkins and trigger the PR build.
As far as master branch is concerned, it works like a charm. If the master branch is updated, Jenkins automatically triggers the build.
I have attached the screen shot of the branch configuration in Jenkins for the GitHub Organization.
So my question is what should be done for PR opening or updating, that would cause Jenkins to start build automatically.
Solution
It sounds like maybe you need to configure a webhook for git if you are using the git plugin, but I think that may just build the master branch. I haven't used git much, so you might be able to use the web hook to have it build the pull request - I don't know.
Instead, you might want to check out the pull request builder plugin and see if that does what you are looking for.
Instead, you might want to check out the pull request builder plugin and see if that does what you are looking for.
Context
StackExchange DevOps Q#2560, answer score: 3
Revisions (0)
No revisions yet.