Skip to content

Questions on notification format in 5.0.0 with Adaptive Cards #366

@rdrgporto

Description

@rdrgporto

Hi,

We have updated the plugin to version 5.0.0 to use Microsoft Adaptive Cards. We have created a Workflow in Teams by using Webhook Template called Post to a channel when webhook required is a received:

Our previous configuration was as follows (here’s a simple example for when the build is a Success)::

post {
 success {
  withCredentials([string(credentialsId: "${env.MICROSOFT_TEAMS_CREDENTIAL}", variable: "WEBHOOK_URL")]) {
   office365ConnectorSend webhookUrl: "${env.WEBHOOK_URL}",
   message: "**Status**: Success  \n **Build**: ${env.BUILD_NUMBER}  \n **Commit**: ${env.GIT_COMMIT.take(7)}  \n **More info**: [Jenkins](${env.BUILD_URL})",
   color: '#58D68D'
  }
}

Image

With the new configuration (we’ve only added the adaptiveCards parameter)

post {
 success {
  withCredentials([string(credentialsId: "${env.MICROSOFT_TEAMS_CREDENTIAL}", variable: "WEBHOOK_URL")]) {
   office365ConnectorSend webhookUrl: "${env.WEBHOOK_URL}",
   message: "**Status**: Success  \n **Build**: ${env.BUILD_NUMBER}  \n **Commit**: ${env.GIT_COMMIT.take(7)}  \n **More info**: [Jenkins](${env.BUILD_URL})",
   color: '#58D68D',
   adaptiveCards: true
  }
}

Image

We have several doubts/questions about the new notification format:

  1. Does it make sense to display "Notification from node-app » main » master"? Isn't it redundant?
  2. Does it make sense to show the build in the title? Previously, it didn't appear there; we displayed it in the message instead.
  3. Is the color: parameter necessary? We've noticed that the color changes based on whether it's Success, Failure, etc.

Thanks in advance,

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions