问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/55388335/jenkins-disables-project-builds-on-branches-after-a-pull-request-is-issued