Closed JustinGol closed 4 years ago
Hi,
Does your parameter presents at build Parameters tab?
Hi Alex, it does, see below. It was called slack-notification-target-database which I created for testing purposes but I also had a system parameter that I tried too unsuccessfully.
This was my message format: <{link}|{name}> {%slack-notification-target-database%} Status: {status}
I guess the reason of this behavior is that your parameter name contains dashes and this symbol is absent in the regex on https://github.com/alexkvak/teamcity-slack/blob/af520013b3b2ea0ec1109ea97f44e688b48db769/slackIntegration-server/src/main/scala/com/fpd/teamcity/slack/MessageBuilder.scala#L68
I'll fix it in couple of days.
I guess the reason of this behavior is that your parameter name contains dashes and this symbol is absent in the regex on
I'll fix it in couple of days.
I tested the regex but was only testing against the % and didnt add a hyphen. I see now it doesnt work. Appreciate it Alex.
By the way I did so while teamcity always separates words in parameters with dots :)
But it does not matter, it's still bug.
Thats a good point, I never noticed that before. We always had a convention to use hyphen. On their docs they recommend the following: [a-zA-Z0-9._-*]
Thanks for fixing this and for doing it so quickly
I built a new notification thats meant to read TeamCity parameters but this isnt working for me. Im using TC 2018.2.1. I tried both system and configuration parameters and tried different variations of:
I looked into the code below and cant see a reason why it doesnt convert the parameter to its real value, assuming the build object works as expected.
MessageBuilder line to read parameters