-
Notifications
You must be signed in to change notification settings - Fork 28
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
Enable all triggers for slack #13
Comments
The new templates support is still alpha and I haven't implemented all the build events yet. This is the file that needs a few more entries in it. https://github.com/tcplugins/tcWebHooks/blob/custom-templates/tcwebhooks-core/src/main/resources/webhook/teamcity/payload/template/SlackComWebHookTemplate.properties |
I see. Is a pull request for adding this welcome? :) |
Yes. Very welcome. Also, the text in that file needs better wording. One probably expects something better than "all your failures are belong to us" :-) |
The names of the properties are based on the following https://github.com/tcplugins/tcWebHooks/blob/custom-templates/tcwebhooks-core/src/main/java/webhook/teamcity/BuildStateEnum.java |
Hi. I'm just wondering how you got on with those templates. I have a bit of time this weekend so could have a crack at it if you haven't had a chance. |
@coolya Do you have slack messages that you think tcWebhooks should emulate? Even a screenshot would be a good start. |
FWIW, here's my success message. I think it could be more terse.
(with "'s replaced with ", of course) |
Ah. Interesting. I would have made it much more verbose so thanks for the feedback. Maybe it would be a good idea to have a |
@nbergen. I presume you are overriding these in |
More terse vertical-space wise, but ran out of time to configure it. I actually just dropped it in
|
Cool. Thanks so much. I see you're on 0.9.x.x so can't take advantage of the new template features of the 1.1alpha versions. Therefore what you're doing is the best way for that version. I can still take your ideas and use them as the basis for a 1.1 template :-) |
As I was trudging around our TC filesystem, I admit I was a little envious of what looks likes UI to edit these in the alpha ;) |
Don't worry. Not all the ui is done for 1.1 so one still can't actually edit the payload in the ui yet. I'm making progress on the REST api and then can write that ui to talk to that. I just wish I had more time in the evenings. |
Having said that, choosing from a predefined list of templates does work. And customising templates editing webhook-templates.xml does too. |
@netwolfuk are there instructions on customizing webhooks-templates.xml? I don't have that file so I'm not sure what would go in it |
Ah, found an example https://github.com/tcplugins/tcWebHooks/blob/v1.1-alpha6.109.134/tcwebhooks-core/src/test/resources/webhook-templates.xml I'll try that out. Oh and hi @nbergen, hope all is well 😄 |
This is essentially the same as #61 so once this is done, MatterMost support should just work, |
@aaronjensen @nbergen BTW the UI is done in alpha11. So you can edit templates much more easily. |
- Added more buildStates. - Normal slack.com template more verbose - Compact slack.com template more compact. - Takes advantage of the ${capitalise()} and ${substr()} macros.
Is there any particular reason why I can't customize the events to sent when I select slack JSON payload?
We are running tons of builds a day and I only want to notify the slack channel when the status changes from success to failure and vice versa.
The text was updated successfully, but these errors were encountered: