4
votes

I'm currently in the process of connecting an existing Jenkins server to Microsoft Teams. I've gotten to the point where I'm able to send notifications out of our multi branch pipeline builds to Microsoft Teams using their Office 365 Connector plugin.

To send a message to the connector I use the following call:

office365ConnectorSend message: "started ${env.JOB_NAME} ${env.BUILD_NUMBER} commited by @${user} [View on Jenkins](${env.BUILD_URL})", webhookUrl: url

where user is the username of the commiter is Microsoft Teams. What happens now in Teams is that the following message is posted by the Connector (in one of those "rich textboxes" instead of normal message):

started Testing project NO/MsTeamsFeedbackTest 29 commited by @Nick Otten View on Jenkins

As you can see by the @ the user didn't get tagged, its just plain text. How can I make it so that the user gets tagged (and thus notified to the channel)

tltr: How can I get the Jenkins connector to tag/notify a user in Microsoft Teams when called from a multi branch pipeline build

1

1 Answers

6
votes

Only the Office 365 connector card format is supported over Incoming Webhook. Connectors do not support @mentions yet.