tcWebHooks
tcWebHooks copied to clipboard
#substringBefore(${buildLog} and alternatives
In the build log I have the message:
##teamcity [URL'https://appcenter-filemanagement-distrib4ede6f06e.azure edge.net/e8b79f30--4220- 884a-5d4c5d5af9b3/build.apk?']
How to output the content of this message in json, for sending notifications in a slack? #substringBefore(${buildLog} doesn't work
Hi @fagionpw.
I don't understand what you want to achieve. The ##teamcity
service message doesn't appear to be related to the substring
code in your second paragraph.
There is a substr
command in velocity already..
#substr(text, startIndex, endIndex, minLength)
- Returns the sub string of text starting at startIndex and finishing at endIndex, if text is longer than minLength.
See https://github.com/tcplugins/tcWebHooks/wiki/WebHook-Templates-%3A-The-Velocity-Templating-Engine