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

0
10 comments

you can try .*
it works

0
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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

0

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

0
Avatar
Permanently deleted user

Did you try it in TeamCity build configuration?

0

Yeah. Please see attached screenshot.



Attachment(s):
2014-05-05 13-52-37 One Configuration -- TeamCity - Google Chrome.png
0
Avatar
Permanently deleted user

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

0

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
Avatar
Permanently deleted user

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

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

0

Please sign in to leave a comment.