Skip to content

Deploy hooks

A deploy hook is a secret URL bound to a test tag. When something calls it, MaxoPerf starts a run of every test in the workspace that carries that tag and passes the deployed URL to the tests. Use it when your deploy tool cannot run the GitHub Action or the CLI.

You need the workspace admin role.

  1. Tag the tests the hook should run, for example smoke, with the tags field of the test file or in the console.

  2. Open Workspace → Deploy hooks and select Create hook.

  3. Fill in the form:

    FieldMeaning
    NameUnique within the workspace, for example Prod smoke.
    TagEvery non-deleted test in the workspace with this tag runs on a trigger.
    URL keyThe config value that receives the deployed URL. Default TARGET_URL.
    Allowed keysExtra config values a generic call may override (up to 20).
    Signing secretOptional. A workspace secret used to verify signatures.
  4. Copy the URL from the confirmation. MaxoPerf shows it once. It looks like https://app.maxoperf.com/v1/hooks/deploy/mpdh_.... The list afterwards shows only the last four characters.

The URL is shown once. The tabs hold copy-ready setup for each provider.

The URL is the credential. Anyone who has it can start runs of that tag’s tests, but nothing else. Store it in your deploy tool’s secret settings. If it leaks, use Rotate on the hook to get a new URL (shown once), or delete the hook. The old URL stops working immediately.

Runs started by a hook run as the user who created the hook, with that user’s permissions. If that user loses access, triggers fail with HOOK_OWNER_UNAUTHORIZED.

Workspace, Deploy hooks lists each hook with its tag and the result of its last trigger.

Any shell, pipeline or script can call the URL. The body is optional JSON:

Terminal window
curl -X POST "$MAXOPERF_DEPLOY_HOOK_URL" \
-H "Content-Type: application/json" \
-d '{
"configOverrides": { "TARGET_URL": "https://pr-482.preview.example.com" },
"ciContext": { "branch": "feature/checkout", "sha": "3f2c1a9d4b7e" }
}'
  • configOverrides keys must be the hook’s URL key or one of its allowed keys. Any other key returns 400 HOOK_OVERRIDE_NOT_ALLOWED.
  • ciContext is shown on the started runs as provenance. The source is always Deploy hook.
  • An empty body is fine. The tests then use their stored config values.
  • There is no Authorization header.

The call returns 202:

{
"hookId": "dh-0123456789",
"source": "generic",
"triggered": [{ "testId": "tst-0123456789", "runId": "run-0123456789", "replayed": false }],
"blocked": [
{ "testId": "tst-0123456780", "code": "RUN_START_BLOCKED", "reason": "concurrent_runs", "title": "Concurrent run limit reached" }
]
}

blocked lists tests that could not start (for example the concurrent run limit) and why. A trigger starts at most 20 tests. When nothing starts on purpose, the response has an ignored reason:

ignoredMeaning
event_not_successA GitHub, Vercel or Netlify event that is not a successful deploy.
no_deploy_urlA provider event arrived without a usable http(s) URL.
no_tests_with_tagNo test in the workspace carries the hook’s tag.

The call returns immediately. It does not wait for the runs. To wait and gate, use the Action or the CLI.

  1. In your Vercel project open Settings → Webhooks and create a webhook.
  2. Choose the deployment.succeeded event.
  3. Paste the hook URL.
  4. If you set a signing secret on the hook, use the same value as the Vercel webhook secret.

MaxoPerf reads the deployment URL from the payload and passes it as the hook’s URL key. For the full Vercel flow see Load test a Vercel app.

  1. In Site configuration → Notifications → Deploy notifications, add an outgoing webhook for Deploy succeeded.
  2. Paste the hook URL.
  3. Set the JWS secret token to the hook’s signing secret, if you use one.

The test receives the deploy’s SSL URL.

To trigger from GitHub without a workflow, add a repository webhook (Settings → Webhooks):

  1. Payload URL: the hook URL.
  2. Content type: application/json.
  3. Secret: the hook’s signing secret, if set.
  4. Events: select Deployment statuses only.

Only deployment_status events with state success start runs. The test receives the deployment’s environment URL, or its target URL when there is none.

Without a signing secret, the URL alone authorizes a call. Add a signing secret for a second factor. MaxoPerf then checks the signature of every call against the exact request body, and rejects a missing or wrong signature with 401 HOOK_SIGNATURE_INVALID.

CallerHeaderValue
GitHubX-Hub-Signature-256sha256= and the HMAC-SHA256 of the body, hex
VercelX-Vercel-SignatureHMAC-SHA1 of the body, hex
NetlifyX-Webhook-SignatureA JWS signed with HS256 whose sha256 claim matches the body
GenericX-MaxoPerf-Signaturesha256= and the HMAC-SHA256 of the body, hex

Sign a generic call like this:

Terminal window
BODY='{"configOverrides":{"TARGET_URL":"https://staging.example.com"}}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$HOOK_SIGNING_SECRET" -hex | sed 's/^.* //')
curl -X POST "$MAXOPERF_DEPLOY_HOOK_URL" \
-H "Content-Type: application/json" \
-H "X-MaxoPerf-Signature: sha256=$SIG" \
-d "$BODY"

The signing secret is a workspace secret. If it is deleted, triggers fail with HOOK_SIGNING_SECRET_UNAVAILABLE.

Providers retry deliveries, and you may press Redeliver in GitHub. MaxoPerf recognizes a repeated delivery and returns the runs it already started, with "replayed": true, instead of starting new ones. It identifies a delivery by:

  • GitHub: the X-GitHub-Delivery header
  • Vercel: the event id
  • Netlify: the deploy id with its state
  • Generic: the Idempotency-Key header you send. Without it, every call starts new runs.

The hooks list shows the outcome of each hook’s last trigger: time, source, how many runs started or were blocked, and any ignored reason or error code. Started runs carry the CI chip with Deploy hook as the source.

StatusCodeCause
400HOOK_PAYLOAD_INVALIDThe body is not JSON, or ciContext or configOverrides is not an object.
400HOOK_OVERRIDE_NOT_ALLOWEDAn override key is not allowed for this hook.
401HOOK_SIGNATURE_INVALIDSignature missing or wrong.
401HOOK_SIGNING_SECRET_UNAVAILABLEThe signing secret is missing or unreadable.
403HOOK_OWNER_UNAUTHORIZEDThe hook’s creator can no longer start these runs.
404Unknown, rotated or deleted URL.

Webhooks from providers must be sent as application/json. Calls are limited per source IP address.