AlphornAlphorn Docs

CI/CD Pipeline Notifications

Get notified when builds pass, fail, or need attention.

CI/CD pipelines run in the background — you need to know when something fails without constantly watching dashboards. Add a curl step to your pipeline and Alphorn routes the result to the right people.

GitHub Actions

Add a notification step at the end of your workflow:

.github/workflows/deploy.yml
- name: Notify on success
  if: success()
  run: |
    curl -s -X POST ${{ secrets.ALPHORN_WEBHOOK }} \
      -H "Content-Type: application/json" \
      -d '{
        "title": "Deploy succeeded",
        "message": "${{ github.repository }} deployed from ${{ github.ref_name }} (commit ${{ github.sha }})",
        "priority": 2,
        "tags": ["ci", "deploy", "success"]
      }'

- name: Notify on failure
  if: failure()
  run: |
    curl -s -X POST ${{ secrets.ALPHORN_WEBHOOK }} \
      -H "Content-Type: application/json" \
      -d '{
        "title": "Deploy FAILED",
        "message": "${{ github.repository }} failed on ${{ github.ref_name }}. See: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
        "priority": 5,
        "tags": ["ci", "deploy", "failure"]
      }'

GitLab CI

.gitlab-ci.yml
notify:
  stage: .post
  script:
    - |
      if [ "$CI_JOB_STATUS" = "success" ]; then
        PRIORITY=2; TITLE="Pipeline passed"
      else
        PRIORITY=5; TITLE="Pipeline FAILED"
      fi
      curl -s -X POST "$ALPHORN_WEBHOOK" \
        -H "Content-Type: application/json" \
        -d "{
          \"title\": \"$TITLE\",
          \"message\": \"$CI_PROJECT_NAME on $CI_COMMIT_REF_NAME — $CI_PIPELINE_URL\",
          \"priority\": $PRIORITY,
          \"tags\": [\"ci\", \"$CI_JOB_STATUS\"]
        }"
  when: always

Routing examples

ChannelFilterPurpose
Slack (#deployments)tags CONTAINS "deploy"All deploy activity
Slack (#dev)tags CONTAINS "failure"Only failures, to avoid noise
PagerDutypriority >= 4 AND tags CONTAINS "failure"Page on-call for production failures
Emailtags CONTAINS "ci"Archive all CI activity

On this page