Reputation: 21
I'm working on a project where we are going to integrate Lighthouse CI into our TeamCity Pipeline. That's working, but I want to post results into our Slack channel using the official Slack Notifier and system messages (Slack Notifier itself is not able to use message templates yet).
I'm extracting the link and meta information about the report via the Lighthouse CI Server API which working perfectly, the only thing is imagine the project's name (Git, TeamCity and LHCI) is "MyApp" and the Lighthouse CI report is stored in a link looking like http://192.168.1.3:9001/app/projects/myApp/compare/6c216h396311
The link that the notifier will post in our Slack Channel suddenly looks like this:
http://192.168.1.3:9001/app/projects/********/compare/6c216h396311
I tried to post "MyApp" as a default system message without using the Slack Notifier, and thats working. While using the Slack Notifier makes my projects name unreadable. I'm not able to find any information to prevent this behavior.
Let TeamCity post the LHCI Report from a on-premise hosted LHCI Server via System Messages and the official Slack Notifier.
Actually the only thing that should be prevented is to postURLs, which makes sense, but where to prevent censoring of the project's name?
Upvotes: 0
Views: 37
Reputation: 21
I finally figured something out..
Seems like TeamCity just parse all the notification messages send by Slack Notifier (official) and if something matches with an internal used accountname, its just censoring it. Makes absolutly sense for several security reasons, but in our case the accountname matches our project and domainname.. so its not really necessary to prevent that "leakage" but in the end it's probably not really smart to choose such a account name for a TeamCity maintaining account.
What i did is not changing the accountname, what i would like to but im new in my company and dont want to mix up too many things at once. So i just wrote a small php script to use the forbidden name in an URL and redirect.
Should you do that aswell?
No, you shouldn't. Use a TeamCity username that has nothing to do with things you wanna display in any kind of external application.
That's something i gonna suggest my company in the near future.
Best Wishes
Upvotes: 1