Repository navigation
[#3336] Signed the Lagoon PR closure webhook with 'LAGOON_WEBHOOK_TOKEN' and switched to the 'webhook.amazeeio.cloud' endpoint. - #3338
Conversation
…EN' and switched to the 'webhook.amazeeio.cloud' endpoint.
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 20 minutes for your next included review. View limit details
|
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6afa3c6397fe2b6628d81748--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3338 +/- ##
=======================================
Coverage 92.65% 92.65%
=======================================
Files 114 114
Lines 5091 5091
Branches 49 49
=======================================
Hits 4717 4717
Misses 374 374 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Code coverage (threshold: 90%) Per-class coverage |
|
Code coverage (threshold: 90%) Per-class coverage |
Closes #3336
Summary
.github/workflows/close-pull-request.ymlnow signs the closedpull_requestevent with theLAGOON_WEBHOOK_TOKENrepository secret before posting it to Lagoon. It sendsX-Hub-Signature-256andX-Hub-Signatureheaders the same way GitHub signs its own webhooks, and its default endpoint ishttps://webhook.amazeeio.cloud/instead ofhttps://hooks.lagoon.amazeeio.cloud/.Since 2 November 2026, Lagoon rejects unsigned webhooks. It answers a rejected one with HTTP 200 and
{"error":"unable to resolve project for webhook"}, socurlexited 0, the job went green, and every closed PR left itspr-<N>environment running until someone deleted it by hand.After merge, the job fails when
LAGOON_WEBHOOK_TOKENis empty, when the HTTP request fails (--fail-with-body), or when the response body contains"error". It prints Lagoon's response on every run. Consumer projects need to add theLAGOON_WEBHOOK_TOKENsecret, and the docs now say where to get it.LAGOON_WEBHOOK_ENDPOINTstill overrides the endpoint. In the template repository itself, aVORTEX_DEV-fenced job-levelif:skips the job, becausedrevops/vortexhas no Lagoon project and no token. The installer strips that fence, so consumers never see it.Before / After
Changes
Workflow
.github/workflows/close-pull-request.yml: signs$GITHUB_EVENT_PATHwithopenssl dgst -hmac(SHA-256 and SHA-1) and sends the same file with--data-binary @"$GITHUB_EVENT_PATH", so the signed bytes and the body are identical. Thecat | curl --data-binary @-pipe is gone.--silent --show-error --fail-with-body, an empty-secret guard and a response check for"error", and passesLAGOON_WEBHOOK_TOKEN: ${{ secrets.LAGOON_WEBHOOK_TOKEN }}into the step.#;< VORTEX_DEVjob-levelif: ${{ github.repository != 'drevops/vortex' }}, so PR closures in the template repository don't fail on the missing secret.Documentation
.vortex/docs/content/deployment/lagoon.mdx: documents the signed webhook, the 2 steps to addLAGOON_WEBHOOK_TOKEN(the Webhook token from the project's Details page in the Lagoon UI, or the organization's token for a polysite), the failure modes and the new default endpoint. It also tells CircleCI projects with GitHub Actions enabled to add the secret..vortex/docs/content/installation.mdx: adds theLAGOON_WEBHOOK_TOKENsecret to both the GitHub Actions and the CircleCI setup steps, linking to the Lagoon deployment page..vortex/docs/cspell.json: addspolysite, Lagoon's term for a multi-project site, to the spelling dictionary.Installer fixtures
ahoy update-snapshots: the 5close-pull-request.ymlfixtures underhosting_lagoon,hosting_project_name___lagoon,migration_enabled_lagoon,migration_disabled_lagoonandprovision_database_lagoon. They match the template with theVORTEX_DEVfence removed.