Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I notify to Slack channel on deployment events in yaml-spec? Edited

Have been fiddling with yaml-spec deployments with some late success (that yaml-structure is a hump, you know).

Got email notifications working after some trial and error.

Is it possible to trigger Slack channel notification from yaml-specs too?

If so, what is the recipient type and how do we get the slack channel name and webhook token in there?

My google-fu got me some interesting links (some old, some rudimentary):

https://community.atlassian.com/t5/Bamboo-questions/Setup-notification-in-YML-bamboo-specs/qaq-p/731810

And the obvious links to reference docs etc, but no definitive answers.

My guess is that slack notifications is not implemented for yaml-spec yet, though...

This is what I've got now (works):

triggers: 
- build-success
notifications:
- events:
- deployment-finished
recipients:
- emails:
- m@j.com

Edit: speling

1 answer

1 accepted

2 votes
Answer accepted

Hi @matgry

It is possible to do it through Java Specs. I did not find it in our docs for YAML and the Bamboo source code didn't seem to show that option either.

I've opened a feature request to address this:

The easy way to see how to configure this through Java specs is:

  1. Install the plugin Slack Notifications for Bamboo | Atlassian Marketplace
  2. Configure your deployment environment with the slack notification you need
  3. Still in the deployment environment configuration [...] (top right)  >> View project as Java Specs
  4. Copy the configuration

This is the part of the code showing the notification you need:

.notifications(new Notification()
.type(new AnyNotificationType(new AtlassianModule("bamboo.deployments:deploymentStartedFinished")))
.recipients(new AnyNotificationRecipient(new AtlassianModule("com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack"))
.recipientString("https://<YOUR_DOMAIN>.slack.com/services/new/incoming-webhook.|#<YOUR_CHANNEL>||"))));

I hope you can use Java Specs instead.

Thanks. I'll keep an eye on the feature request, and maybe look into Java specs as well.

Like Daniel Santos likes this

You are welcome @matgry!

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

943 views 4 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you