You can prevent Jenkins from initiating a pull request build for a particular branch by applying a regular expression match in the branch specifier section of the Jenkins job configuration.
For example, if you want to skip builds for a branch named "skip-build", you can add the following regular expression match:
^(?!skip-build).*$
This regular expression will match all branch names except for "skip-build".
Jenkins will now skip initiating a pull request build for the specified branch.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-06-24 16:04:21 +0000
Seen: 13 times
Last updated: Jun 24 '23
How can a parameter file be uploaded to GitHub using a Jenkins Job?
How can Azure DevOps Pull Request and Jenkins be utilized within a corporate network?
On the Jenkins server, the tcpSlaveAgentListener cannot be located.
What can be done when Jenkins fails to establish a connection with Git repository?
What is the procedure for referencing a particular branch in a shared Jenkins library?
How can the error message "sudo command not found" be resolved when displayed in a Jenkins pipeline?
How can I transfer folders from s3 to a jenkins pipeline?
What is the process to activate SAML SSO on Jenkins?