Vincit / gocd-slack-task

Go CD plugin allowing to send messages to Slack
13 stars 7 forks source link

Globally configure Slack Webhook URL #9

Open dirkschneemann opened 5 years ago

dirkschneemann commented 5 years ago

It would be great if the Slack Webhook URL (which is unlikely to change from task to task) could be configured only once at some global location. Currently, everybody who sets up a new Slack task needs to know this URL which is not convenient.

juhasipo commented 5 years ago

I'll add support for global plugin settings and add this setting there.

juhasipo commented 5 years ago

@dirkschneemann I didn't remember this but GoCD task plugins don't support the global plugin settings UI so this will have to implemented some other way,

However, there is one way to achieve this functionality using the current version. You can set the webhook URL as a an environment variable in an Environment or a Pipeline. E.g. create a variable named SLACK_WEBHOOK_URL in an Environment and then use $SLACK_WEBHOOK_URL as the Slack Task's Webhook URL.

It's not as convenient as a proper global setting but I hope this helps. I'll try to look at the global configuration in more detail later this weekend.

dirkschneemann commented 5 years ago

Thanks, @juhasipo , I will try this in the meantime.