Condition parameter equals empty


I am attempting to create workflow where the build step condition states "if the parameter value is empty, do this, else do that". The parameter could be <empty> or 'hotfix-12.92.172.x' or '186.85.34' or 'foo' or ...(anything). I just want to know if it has a value or not.

Comment actions Permalink
Hi! Go to build step settings > Add condition > Other condition...

Parameter Name: your_parameter_name_here
Condition: matches
Value: ^(?!\s*$).+

The value is a regex that will match anything but an empty string or a whitespace.
Comment actions Permalink

Thanks Anatoly Cherenkov. I used just now figured out I could use '^$' to do what I needed, but this works as well.


Please sign in to leave a comment.