Lesson255 words

Alerting on pipeline events

Configure alerts for events in GitHub Actions and Azure Pipelines

Routes

PlatformMechanism
Azure PipelinesNotification subscriptions · service hooks · the Teams app
GitHub ActionsWorkflow notifications · webhooks · the Teams/Slack app

Either can also call out from within the run — a step that posts on failure — which is the flexible option when the condition is more specific than "the run failed".

What deserves an alert

The same discipline as everywhere else in this unit: alert on things a human must act on.

AlertDo not alert
main build brokenEvery successful run
Deployment awaiting approvalEvery stage transition
Release failed in productionEvery PR build result
Scheduled security scan failedEvery dependency update PR

The condition that gets forgotten

A step that reports failure must itself run on failure. Every step carries an implicit succeeded(), so a notification step placed after a failing step is skipped — the same defect as publishing test results without condition: succeededOrFailed().

yaml
- script: ./notify.sh condition: failed()

A failure notification that only fires on success is worse than none, because the silence is read as good news.

Route to an owner

An alert to a shared inbox nobody owns is not an alert. Route to a team with the ability to act, and make ownership explicit.

Primary sources

Ready to study Designing and Implementing Microsoft DevOps Solutions (AZ-400)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free