I have set up the office365Connector in a pipeline like so.. How to add the auto Remarks like Started by an SCM change or Started by User SoAndSo.. and how to add the Committers and Developers..
post{
success{
office365ConnectorSend(
status: "Build Success",
webhookUrl: "Url",
color: '00ff00',
message: "Some Message"
)
}
failure{
office365ConnectorSend(
status: "Build Failed",
webhookUrl: "UrL",
color: 'ff4000',
message: "The build has failed, please check build logs"
)
}
}
If you want to @mention someone, that's still not available by the office365 plugin for jenkins
To get the user that started the build, see this answer
To get the committer's email, see this answer
If you really want to mention users, as I do, you can:
if you know java, create a PR that solves this issue on the official repo
if you don't know java, or can't spare the time, you will have to hack things together:
This is how you would use curl from a pipeline
Now you have to get the user is from the User graph api
Add the webhook as a credential on jenkins, like this:
So you can invoke it in the pipeline:
No, this is not trivial.
Yes, I'm also in pain by how bad this mention is achieved.
Disappointed, but not surprised. This is Microsoft Teams after all.
Please surive.