Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions .github/workflows/slack-deploy-notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,41 @@ jobs:
notify:
runs-on: ubuntu-latest
steps:
# Classify the deploy as Release Train (rt) or Hotfix based on the
# image tag shape. RT deploys tag `vX.Y.Z-rc.YYYY-MM-DD.N` β€” the rc
# suffix with a train-date is the tell. Everything else (plain
# `vX.Y.Z` main deploys, feature-branch tags, ad-hoc) is treated
# as a hotfix / out-of-band deploy.
#
# Rationale (Peace Room 2026-07-09): during P0 triage the team needs
# to quickly spot which prod deploys skipped the RT sign-off flow,
# since hotfixes see less scrutiny and are more likely culprits.
# This runs unconditionally because the workflow is prod-only by
# structural design β€” callers only invoke it from prod deploy
# paths (deploy-eks.yaml β†’ slack-notification), so every message
# emitted here is a prod message.
- name: Classify deploy type
id: type
env:
IMAGE_TAG: ${{ inputs.image_tag }}
run: |
set -euo pipefail
if [[ "$IMAGE_TAG" =~ -rc\.[0-9]{4}-[0-9]{2}-[0-9]{2}\.[0-9]+$ ]]; then
BADGE_MRKDWN="πŸš‚ *RT*"
BADGE_TEXT="πŸš‚ RT"
CLASSIFICATION="release-train"
else
BADGE_MRKDWN="⚑ *Hotfix*"
BADGE_TEXT="⚑ Hotfix"
CLASSIFICATION="hotfix"
fi
echo "Classified $IMAGE_TAG as $CLASSIFICATION"
{
echo "badge_mrkdwn=$BADGE_MRKDWN"
echo "badge_text=$BADGE_TEXT"
echo "classification=$CLASSIFICATION"
} >> "$GITHUB_OUTPUT"

# Compute the previous production release tag by walking the GH
# Releases API and picking the most recent non-current, non-draft,
# non-prerelease entry. Callers gate this workflow on
Expand Down Expand Up @@ -77,13 +112,13 @@ jobs:
with:
payload: |
{
"text": "${{ github.event.repository.name }} deployed",
"text": "${{ steps.type.outputs.badge_text }} Β· ${{ github.event.repository.name }} deployed",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*${{ github.event.repository.name }} deployed by ${{ github.triggering_actor }}*\n\tVersion: `${{ inputs.image_tag }}`\n\tView the <${{ inputs.dashboard_url }}|Deployment>\n\tView the <${{ inputs.apm_url }}|Service APM>${{ steps.diff.outputs.diff_line }}"
"text": "${{ steps.type.outputs.badge_mrkdwn }} Β· *${{ github.event.repository.name }} deployed by ${{ github.triggering_actor }}*\n\tVersion: `${{ inputs.image_tag }}`\n\tView the <${{ inputs.dashboard_url }}|Deployment>\n\tView the <${{ inputs.apm_url }}|Service APM>${{ steps.diff.outputs.diff_line }}"
},
"accessory": {
"type": "button",
Expand Down