问题
I'm trying to use the GIT Parameter Plug-in to list all release branches that need to go in a build process. If I use the plug-in only specifying the parameter type it works fine simple plug-in configuration
When I try to filter the list using the Branch Filter option the list appears empty. I've tried the Branch Filter field with the following values:
- origin/release/*
- release*
- origin/release//*
But they all appear to be wrong.
- As anyone ever configured such a filtering option?
If I wound like to list only my release branches ,my develop (for testing environments) and master (for production environments).
- Is there a way to have multiple filtering?
回答1:
The Git Parameter plugin provides option to make use for RegEx to specify the branch or tag . Steps to be followed
Tick the checkbox stating 'This project is parameterized'
Specify the name of the parameter and select the parameter type (In your case branch)
Click on the Advanced option , and corresponding to Branch filter fill in the RegEx
orgin/release/.*
for release ,origin/develop/.*
for develop andorigin/master/.*
for master
You can configure multiple branch filtering based on the Regex you provide in the Branch filter option
Eg-: (origin/develop|origin/release/.*)
will list the origin/develop branch along with all the release branches
回答2:
The plugin seems to use standard regular expression syntax. So you have to specify your filters as:
origin/release/.*
or
.*release.*
回答3:
origin/hot.|origin/release.
you can this
来源:https://stackoverflow.com/questions/37394096/git-parameter-plugin-filtering-branches