mibexsoftware / bamboo-plan-dsl-plugin

Configuration as code with a Groovy-based DSL or YAML for Atlassian Bamboo.
https://marketplace.atlassian.com/plugins/ch.mibex.bamboo.plandsl/
Other
40 stars 16 forks source link

Unable to create customNotification #91

Closed mayani closed 5 years ago

mayani commented 5 years ago

Type: Bug Version: 1.9.14 Format: YAML Uses: Slack Plugin: Slack Notifications for Bamboo (com.atlassian.bamboo.plugins.bamboo-slack) Seed plan succeeds, but does not add the notification.

      notifications:
        - !customNotification
          event: !event JOB_HUNG
          notificationRecipientType: 'com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack'
          config:
            webhookUrl: ['URL']
            channel: ['#channel]
            botName: null
            botName: [Bamboo]
mrueegg commented 5 years ago

Hi,

First, please excuse my very late response.

Unfortunately, I wasn't able to reproduce this problem. Here's my test case:

project:
  key: TEST
  name: TEST
  plans:
    - key: TEST
      name: TEST
      description: test
      notifications:
        - !customNotification
          event: !event JOB_HUNG
          notificationRecipientType: 'com.atlassian.bamboo.plugins.bamboo-slack:recipient.slack'
          config:
            webhookUrl: ['URL']
            channel: [channel]
            botName: [Bamboo]

The only difference I could spot is that you are missing the closing single quote in the channel field and that you have a duplicate botName definition. Does that help?

Best regards, Michael

mayani commented 5 years ago

Difference: @mrueegg These are just typos from removing actual values.

We were able to get it working, but it required pre-existing notifications to be removed. Notifications did get created after that. With pre-existing notifications, logs would show notification being added/updated, but actual actions did not get applied.