Condition parameter equals empty

Answered

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.

0
2 comments
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.
0

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

1

Please sign in to leave a comment.