Configuration parameter of type regex cannot be empty

Hello,

It seems that team city doesn't allow empty string for configuration parameter of type regex, even when we define regex like this : ^$|pattern
Is that correct? and how can I use regex and allow empty string for a parameter?

Thanks

10 comments
Comment actions Permalink

you can try .*
it works

0
Comment actions Permalink

It allows all type of string. What I want to do is allow "pattern" or empty string : ^$|pattern
But it does not work on TeamCity because when we set the parameter type to regex, TeamCity does not allow the parameter value to be empty ...

0
Comment actions Permalink

Is there a way to make a parameter optional and define a regex pattern to validate it ?

0
Comment actions Permalink

I just tried your regex and it worked for me. It allows either empty string or pattern.

0
Comment actions Permalink

Did you try it in TeamCity build configuration?

0
Comment actions Permalink

You can set it, but it will not work when you Run the build, that's my problem

0
Comment actions Permalink

what would happen, if you click on a "run custom build" button (three dots near the Run button) and go to parameters?

Would you be able to update the set the empty parameter value?

0
Comment actions Permalink

Hi,

I am using TeamCity 8.0.1 (build 27435), effective release date 2013-Jun-20
There are the scrrenshots of my parameter configuration and when I try to run the build with this param config.



Attachment(s):
RunningBuildConfig.png
ConfiguringRegexParam.png
0
Comment actions Permalink

This is a bug, which is fixed already. Please update to the latest TC

0

Please sign in to leave a comment.