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
Please sign in to leave a comment.
you can try .*
it works
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 ...
Is there a way to make a parameter optional and define a regex pattern to validate it ?
I just tried your regex and it worked for me. It allows either empty string or pattern.
Did you try it in TeamCity build configuration?
Yeah. Please see attached screenshot.
Attachment(s):
2014-05-05 13-52-37 One Configuration -- TeamCity - Google Chrome.png
You can set it, but it will not work when you Run the build, that's my problem
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?
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
This is a bug, which is fixed already. Please update to the latest TC