Note: I only have Jenkinsfile set up in one of my branches, not the master.
I have setup Git webhooks to monitor push events to my Github repository. However, I am noticing that my Jenkins builds are working fine (picking up push events, triggering builds) as branches, but after a pull request is issued, my branch build gets disabled in the Branches
tab of my project.
However, I do see the new PR listed in my Pull Requests
tab. But now, when I push to Github, the new commits are not triggering builds anymore. In my branches tab, my old branch is now crossed out.
How do I force Jenkins to keep building my branches? I would like to continue building from a branch, even if a PR has been issued.
Configure your pipelineOn the Datalog Tagging tab, check “GitHub project”, and put your project URL in the field. On the Build Triggers tab, check “GitHub Pull Request Builder”. Then the GitHub API credentials is automatically filled in. Make sure the Admin list is filled in with at least one admin name.
For Jenkins to receive PR events through the pull request plugin, you need to add the Jenkins pull request builder payload URL in the Github repository settings. If you need just the PR triggers, you can select the “Let me select individual events” option and select just the “Pull requests” option.
If there is no Jenkinsfile at the root of the repository or if the name is misspelled or is with different letters casing, like JenkinsFile, the job will be disabled.
Two ways to stop your branch from building. Enter the branch in "Exclude branch" and save the settings. If you don't have control of the project settings, the easy way is to rename the Jenkinsfile in the project/branch. This configuration will define to trigger a build if a branch/project has "Jenkinsfile" in it.
That's because you have an on going PR for that branch, whenever the PR reaches any final status, your disabled branch will be enabled again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With