Gates: deploy and merge
Watchtower has two kinds of gate. They answer different questions and run at different times, so they are separate resources. Pick by when the decision is made.
Deploy gate | Merge gate | |
|---|---|---|
Path |
|
|
Runs | After a release is deployed, on its own, once the | Before merge, when your pipeline calls |
Reads | The service's error rate and p95 after the release | The commit's failed tests, new flaky tests and coverage |
Decision | Watchtower records pass or fail on the release ( | Yours: the response lists the |
Body |
|
|
Use a deploy gate to catch a release that is healthy in CI and sick in production. Use a merge gate to keep a commit out of the main branch. A team that wants both creates one of each; neither replaces the other, and they share no ids.
Names
gates/deploy and gates/merge are the names to use. /quality-gates and /ci/gates are the original paths; they keep working and return the same results as their new names (POST, GET, DELETE /{id} and, for merge gates, POST /{id}/evaluate). The OpenAPI document and generated clients still list the original paths, so the two names can never differ in a client.