Skip to main content
Skip table of contents

Microsoft Teams Bamboo Connector support of Bamboo Specs

Microsoft Teams Bamboo Connector supports Java and YAML Bamboo Specs.

Video demo

You can watch this short video demo on YouTube - https://youtu.be/68MignY6whk

Java Bamboo Specs support

Microsoft Teams Bamboo Connector supports Java specs for notifications and build tasks.

Below is an example of the Microsoft Teams Build Task definition.

CODE
...
.stages(new Stage("Default Stage")
                    .jobs(new Job("Default Job",
                            new BambooKey("JOB1"))
                            .tasks(new VcsCheckoutTask()
                                    .description("Checkout Default Repository")
                                    .checkoutItems(new CheckoutItem().defaultRepository()),
                                new ScriptTask()
                                    .description("Build")
                                    .inlineBody("exit 0"),
                                new AnyTask(new AtlassianModule("com.moveworkforward.bamboo.microsoft-teams-notifier:microsoftTeamsBuildTask"))
                                    .description("MST Build Task")
                                    .configuration(new MapBuilder()
                                            .put("mswebhookUrl", "https://moveworkforward0.webhook.office.com/webhookb2/afad8b60-4507-4100-bff7-f963ae9543ab@57e6a115-9c9a-4cee-9e52-2cae48e2251a/IncomingWebhook/bcc0f209ba554616909d5ed0365acb48/f889a410-e1df-490e-bfae-412eca9d3f60")
                                            .put("msMessage", "The build of Move Work Forward project was successful.")
                                            .build()))))
...

Here is how this Bamboo build task looks in the UI.

And here you can set up the notification.

CODE
.notifications(new Notification()
                    .type(new PlanCompletedNotification())
                    .recipients(new AnyNotificationRecipient(new AtlassianModule("com.moveworkforward.bamboo.microsoft-teams-notifier:recipient.microsoftteams"))
                            .recipientString("https://moveworkforward0.webhook.office.com/webhookb2/afad8b60-4507-41c0-bff7-f963ae9543ab@57e6a115-bcba-4cee-9e52-2cae48e2251a/IncomingWebhook/bcc0f209ba554616909d5ed0365acb48/f889a410-e1df-490e-bfae-412eca9d3f60|Bamboo|true|true|")));

The notification parameters are:

  • Microsoft Teams webhook URL

  • Notifier name

  • If the notification should include the status image (it is loaded from the internet)

  • If the task is enabled

Here is how this notification looks in the UI.

YAML Bamboo Specs support

Microsoft Teams Bamboo Connector supports YAML specs for notifications and build tasks.

Below is an example of the Microsoft Teams Build Task definition.

CODE
...
Default Job:
  key: JOB1
  tasks:
  - checkout:
      force-clean-build: 'false'
      description: Checkout Default Repository
  - script:
      interpreter: SHELL
      scripts:
      - exit 0
      description: Build
  - any-task:
      plugin-key: com.moveworkforward.bamboo.microsoft-teams-notifier:microsoftTeamsBuildTask
      configuration:
        mswebhookUrl: https://moveworkforward0.webhook.office.com/webhookb2/afad8b60-4507-41c0-bff7-f963ae9543ab@57e6a115-9c9a-4cee-9e52-2cae48e2251a/IncomingWebhook/bcc0f209ba554616909d5ed0365acb48/f889a410-e1df-490e-bfae-412eca9d3f60
        msMessage: The build of Move Work Forward project was successful.
      description: MST Build Task
  artifact-subscriptions: []
  ...

Here is how this Bamboo build task looks in the UI.

The notifications in YAML are not supported (by Bamboo itself).

Updated:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.