Skip to main content

release-notes

When a new bundle version is published, release-notes posts it to Slack, Microsoft Teams, or both. The message has:

  • the bundle name and version
  • the changelog of that version, when the publisher included one
  • the instances that can upgrade to it, by project and environment, with the version each one is on
  • the instances on a release channel, such as ~1 or latest, that Massdriver moves to the new version and deploys, with the version each one has deployed

An instance is listed only when it is PROVISIONED or FAILED. An instance can upgrade when its availableUpgrade is the new version.

Development versions, such as 1.3.1-dev.20261124T055403Z, are skipped unless include_development is true.

Settings​

The config file is YAML, at CONFIG_FILE (default /etc/massdriver-automations/config.yaml). An unknown key stops the automation at start. config.example.yaml has every key, with comments.

KeyDefault
include_developmentfalsePost development versions too.
slack.channelThe channel for release notes, with SLACK_BOT_TOKEN. Empty posts nothing to Slack. Ignored with only SLACK_WEBHOOK_URL, which always posts to its one channel.
teams.enabledfalsePost an Adaptive Card to Microsoft Teams.
teams.webhook_url_envTEAMS_WEBHOOK_URLThe environment variable that holds the Teams webhook URL.

Post to Slack (SLACK_BOT_TOKEN and slack.channel, or SLACK_WEBHOOK_URL), to Teams, or to both. With neither, the automation does not start.

yaml
include_development: false

slack:
channel: "#releases"

teams:
enabled: true
webhook_url_env: TEAMS_WEBHOOK_URL

The bundle's Settings params have the keys of the config file, except teams.webhook_url_env: the bundle always reads the webhook from the TEAMS_WEBHOOK_URL secret.

Secrets​

Variable
SLACK_BOT_TOKENThe xoxb- token of the Slack app. Posts go to slack.channel.
SLACK_WEBHOOK_URLA Slack incoming webhook, for a workspace without the app. Every post goes to its one channel. Ignored when the bot token is set.
TEAMS_WEBHOOK_URLA Microsoft Teams Workflows webhook URL, from the "Post to a channel when a webhook request is received" template. Required with teams.enabled.
OTEL_EXPORTER_OTLP_HEADERSHeaders for the OTLP endpoint of Tracing, such as authorization=Bearer abc123.

MASSDRIVER_SIGNING_SECRET, MASSDRIVER_ORGANIZATION_ID, MASSDRIVER_API_KEY, and MASSDRIVER_URL are common settings. All are required.

Permissions​

The service account needs:

  • repo:view on the bundle repos
  • project:view on the projects whose instances are listed. Instances in projects it cannot view are left out.
  • organization:manageEventDestinations, when deployed with the bundle

Host​

The bundle serves the automation at Ingress > Host, such as release-notes.automations.acme.com. Only /hooks/massdriver must be public. On ECS, an empty host uses release-notes.<domain of the cluster's hosted zone>. Refer to Deploy.

Event destination​

The bundle creates a destination for repo.published events with the attribute md-repo-artifact-type=bundle.

To create it yourself:

shell
mass event destination create \
--name release-notes \
--url https://release-notes.example.com/hooks/massdriver \
--event-type repo.published \
--attribute md-repo-artifact-type=bundle

To post only some bundles, add a condition, such as --condition '.data.entity.name | startswith("aws-")'.

Copy the signing secret that the command prints into MASSDRIVER_SIGNING_SECRET.

Run​

shell
docker run -p 8080:8080 \
-v "$PWD/config.yaml:/etc/massdriver-automations/config.yaml:ro" \
-e MASSDRIVER_ORGANIZATION_ID=acme \
-e MASSDRIVER_API_KEY=md_... \
-e MASSDRIVER_SIGNING_SECRET=whsec_... \
-e SLACK_BOT_TOKEN=xoxb-... \
ghcr.io/massdriver-cloud/massdriver-automations:0.3 run release-notes

Limits​

  • The repo.published event names the repo, not the version. The automation posts the newest version that was published at or before the time of the event.
  • The event cannot tell a development version apart, so the destination cannot skip them with a condition. The automation skips them.
  • Each version is posted once while the automation runs, in memory. Run one replica.
  • The automation responds before it posts. A failed post is logged, and Massdriver does not send the event again.
  • Slack shows the first 2,900 characters of the changelog and of each instance list.
  • Slack and Teams do not show Markdown headings. The automation shows them in bold.