HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Publish pipeline artifact to Slack

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
publishartifactpipelineslack

Problem

I have a pipeline on Azure DevOps that publishes an artifact (releasenotes.txt).

It also has integration with Slack using ( https://docs.microsoft.com/en-us/azure/devops/pipelines/integrations/slack?view=azure-devops ) .

How can I send releasenotes.txt to Slack? Is it possible?

Solution

The stock Azure Pipelines app for Slack does not support that workflow of uploading artifacts to Slack. You could use this marketplace task and upload your release notes artifact with it.

Bonus points suggestion, if you are going down the release notes path I would take a look at using Richard Fennell's Generate Release Notes task in combination with the Wiki Updater task.

You can create a generalized Task Group or yaml template that you could pretty much re-use anywhere. For example in the Wiki updater task you can create a release name wiki page formatted like:
$(Build.Repository.Name)\$(Release.EnvironmentName)\$(Release.ReleaseName).md

And then in your Slack message send a generalized link to your release notes.
Release Notes Wiki link

You could push them back into the Repo that the release originated from or a central release notes repository. Your release notes get source controlled and are nicely organized!

Context

StackExchange DevOps Q#10465, answer score: 2

Revisions (0)

No revisions yet.