When a webhook-triggered deploy starts for an app that already has a deploy in progress, the new deploy now cancels the existing one via context cancellation, waits for the lock to be released, and then starts the new deploy. Changes: - Add per-app context cancellation (appCancels sync.Map) to deploy.Service - Deploy() creates a cancellable context and registers it for the app - Add CancelAppDeploy() method to cancel an in-progress deploy - Add ErrDeployCancelled sentinel error for cancelled deploys - Handle context cancellation in build and deploy phases, marking deployments as failed with a clear cancellation message - Webhook triggerDeployment() now cancels in-progress deploys and retries until the lock is released (up to 30 attempts with 2s delay) fixes #38 |
||
|---|---|---|
| .. | ||
| webhook_test.go | ||
| webhook.go | ||