Git Parameter Plugin - filtering branches

六眼飞鱼酱① 提交于 2019-12-12 16:09:44

问题


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

  1. Tick the checkbox stating 'This project is parameterized'

  2. Specify the name of the parameter and select the parameter type (In your case branch)

  3. Click on the Advanced option , and corresponding to Branch filter fill in the RegEx orgin/release/.* for release , origin/develop/.* for develop and origin/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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!