env-diff, verify-deploy and notify actions #3

Closed
opened 2026-11-10 22:23:02 +01:00 by robin.wieske · 0 comments
Owner

Context

Each repo carries its own copy of the env report and deploy verification scripts. Move them here as composite actions, plus a notify action for the n8n "Deploy notify" webhook.

Plan: https://forgejo.entwirr.me/Wi3eDigital/laravel-deploy-actions/src/branch/main/docs/plan.md (sections "What this repo ships" and "Notifications").

Tasks

  • env-diff/: port .bin/env-diff.sh and .bin/lib/dotenv.awk from Aevana/aevana (git-ref mode, --files, --baseline-file, ENV_DIFF_PATH); output the Markdown report
  • verify-deploy/: port .bin/verify-deploy.sh from Aevana/aevana (attempts, delay, max time, --diagnose, host masking, no Set-Cookie output)
  • verify-deploy: accept /version as plain text or {"version": "vX.Y.Z"} JSON
  • verify-deploy: input for the user agent (today hardcoded aevana-deploy-verify/1)
  • notify/: build and POST the plan payload (schema: 1, project, repo, env, event, severity, version, title, body, url, reasons, dedup_key, ts) with header X-Notify-Token
  • notify: continue-on-error behaviour by default (never fails the job)
  • notify: required: true mode that fails the step on a non-2xx response and sets commit status notify/pre-prod (success on delivery)
  • Tests for each action (env-diff fixtures, verify-deploy against a local stub server, notify payload shape)
  • README per action with inputs, outputs and an example step

Acceptance criteria

  • env-diff output matches the aevana script on the same inputs (new, changed, removed keys, changed comments, "No environment changes.")
  • verify-deploy exits 0 when <url>/version serves the tag, 1 when it never does, 2 on usage errors; the base URL is never printed
  • verify-deploy passes for both plain-text and JSON /version responses
  • notify payload matches the plan schema exactly, events limited to release.critical, promote.due, promote.blocked, deploy.failed, deploy.succeeded, schedule.failed, heartbeat
  • notify without required never fails the job, also when n8n is down
  • notify with required: true fails on delivery failure and sets notify/pre-prod, which the promote gate reads (24h rule)
  • The token is only sent as a header, never logged

Blocked by

Nothing. Starts after the plan PR #1 is merged.

## Context Each repo carries its own copy of the env report and deploy verification scripts. Move them here as composite actions, plus a `notify` action for the n8n "Deploy notify" webhook. Plan: https://forgejo.entwirr.me/Wi3eDigital/laravel-deploy-actions/src/branch/main/docs/plan.md (sections "What this repo ships" and "Notifications"). ## Tasks - [ ] `env-diff/`: port `.bin/env-diff.sh` and `.bin/lib/dotenv.awk` from Aevana/aevana (git-ref mode, `--files`, `--baseline-file`, `ENV_DIFF_PATH`); output the Markdown report - [ ] `verify-deploy/`: port `.bin/verify-deploy.sh` from Aevana/aevana (attempts, delay, max time, `--diagnose`, host masking, no Set-Cookie output) - [ ] `verify-deploy`: accept `/version` as plain text or `{"version": "vX.Y.Z"}` JSON - [ ] `verify-deploy`: input for the user agent (today hardcoded `aevana-deploy-verify/1`) - [ ] `notify/`: build and POST the plan payload (`schema: 1`, project, repo, env, event, severity, version, title, body, url, reasons, dedup_key, ts) with header `X-Notify-Token` - [ ] `notify`: `continue-on-error` behaviour by default (never fails the job) - [ ] `notify`: `required: true` mode that fails the step on a non-2xx response and sets commit status `notify/pre-prod` (`success` on delivery) - [ ] Tests for each action (env-diff fixtures, verify-deploy against a local stub server, notify payload shape) - [ ] README per action with inputs, outputs and an example step ## Acceptance criteria - [ ] env-diff output matches the aevana script on the same inputs (new, changed, removed keys, changed comments, "No environment changes.") - [ ] verify-deploy exits 0 when `<url>/version` serves the tag, 1 when it never does, 2 on usage errors; the base URL is never printed - [ ] verify-deploy passes for both plain-text and JSON `/version` responses - [ ] notify payload matches the plan schema exactly, events limited to `release.critical`, `promote.due`, `promote.blocked`, `deploy.failed`, `deploy.succeeded`, `schedule.failed`, `heartbeat` - [ ] notify without `required` never fails the job, also when n8n is down - [ ] notify with `required: true` fails on delivery failure and sets `notify/pre-prod`, which the promote gate reads (24h rule) - [ ] The token is only sent as a header, never logged ## Blocked by Nothing. Starts after the plan PR https://forgejo.entwirr.me/Wi3eDigital/laravel-deploy-actions/pulls/1 is merged.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
You do not have permission to read 3 dependencies
Reference
Wi3eDigital/laravel-deploy-actions#3
No description provided.