Skip to main content
Skip table of contents

Slack Bamboo Connector support of Bamboo Specs

Slack 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

Slack Bamboo Connector supports Java specs for notifications and build tasks.

Below is an example of the Slack Build Task definition.

CODE
...
.tasks(new ScriptTask()
                                    .description("Run")
                                    .inlineBody("exit 0"),
                                new AnyTask(new AtlassianModule("com.moveworkforward.bamboo.slack-notifier:slackBuildTask"))
                                    .description("Slack test task")
                                    .configuration(new MapBuilder()
                                            .put("slack_message", "The build finished successfully.\n\n${bamboo.buildPlanName} | ${bamboo.buildKey} | ${bamboo.shortJobName}")
                                            .put("slack_channel", "bamboo")
                                            .put("slack_user", "")
                                            .put("slack_webhookUrl", "https://hooks.slack.com/services/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KR")
                                            .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.slack-notifier:recipient.slack"))
                            .recipientString("https://hooks.slack.com/services/T1MXXXQFK/B040XXXF1L5/LjkpHWXQIxXXXDClQOIQq7LKR|bamboo|Move Work Forward|true|")));

The notification parameters are:

  • Slack webhook URL

  • Notifier name

  • If the task is enabled

Here is how this notification looks in the UI.

YAML Bamboo Specs support

Slack Bamboo Connector supports YAML specs for notifications and build tasks.

Below is an example of the Slack Build Task definition.

CODE
...
 - any-task:
      plugin-key: com.moveworkforward.bamboo.slack-notifier:slackBuildTask
      configuration:
        slack_message: |-
          The build finished successfully.

          ${bamboo.buildPlanName} | ${bamboo.buildKey} | ${bamboo.shortJobName}
        slack_channel: bamboo
        slack_webhookUrl: https://hooks.slack.com/services/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
      description: Slack test task
  ...

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.