Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#substringBefore(${buildLog} and alternatives #218

Open
fagionpw opened this issue Jun 30, 2023 · 1 comment
Open

#substringBefore(${buildLog} and alternatives #218

fagionpw opened this issue Jun 30, 2023 · 1 comment

Comments

@fagionpw
Copy link

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

@netwolfuk
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants