CI/CD · Deploy gate · On request
Zof deploy gate for CircleCI
A CircleCI job can run the Zof deploy gate before a deploy. The gate asks Zof whether the commit may ship to that environment, and stops the deploy unless Zof allows it.
On request
What it does
- Before a deploy, the job asks Zof whether this commit may ship to this environment. Zof answers from the checks on the commit’s pull request, the same checks the Zof / Control check on GitHub shows.
- Allowed: the step passes and the deploy continues. Blocked: the step fails, and the log lists each reason with a link to the change in Zof.
- Waiting: a check is still running or an approval is needed, and the step waits up to your company’s limits.
- If Zof cannot answer, the step fails and the deploy stops. There is no fail-open mode.
- Break-glass deploys whatever the verdict, with a reason you give and a separate token an admin issues, and Zof records it.
Set it up in CircleCI
- Ask us to switch the gate on for your company. Settings › Pipeline tokens then appears in the console. You need to be a company admin, with the repository on GitHub and connected through the Zof GitHub App.
- In the console, open Settings › Pipeline tokens, choose Create token, pick where it can deploy and copy the token. Zof shows it only once.
- Save the token in CircleCI as a project environment variable or a context, named ZOF_GATE_TOKEN. Never paste it into a pipeline file.
- Run the gate image in your deploy job, before the deploy step. The image is linux/amd64 only for now.
- Run the deploy job on a commit from a pull request Zof checked. The log starts with "Zof gate:" and ends with Zof’s answer and a link to the change.
docker run --rm -e ZOF_GATE_TOKEN \
ghcr.io/zof-ai/gate:1 \
zof-gate --environment production --repo example-org/example-app --commit "$GIT_COMMIT" --run-id "$BUILD_ID"Read the full setup guide
The console help covers settings, troubleshooting and what each result means.