Parameter-based Condition "matches" (Regex) does not work if parameter includes "|n"
I am trying the following:
1) Setting a Configuration Parameter which is Empty by default.
2) Inside a Powershell build step I set the parameter to a string with TC escaped line break:
$message = "test |n test"
Write-Host "##teamcity[setParameter name='discord_message' value='$message']"
3) The following build step uses that param inside a "matches" condition
The condition will always fail:
Build step Send Discord Message is skipped because of unfulfilled condition: "discord_message matches .+"
As you can see I am actually only trying to check if the param is not empty. Which I think can be added as a default drop-down option in the future.
I found a workaround, but still wanted to let you guys know about this. Drove me nuts :)
Cheers, Jonas
Please sign in to leave a comment.
Hello Jonas!
Thank you for the information! The issue has been registered in the following youtrack item, that you can follow and vote here:
https://youtrack.jetbrains.com/issue/TW-76947
Thank you,
Guilherme
A workaround is to use
For the matches value