gif-demo-2/gate
CI gate
One question: is this service safe to deploy? The gate answers it. Wire the step below into your pipeline.
Passing
No open breaking violations. Deploys calling /api/gate pass.
Add it to your pipeline
name: contract gate
on: [push]
jobs:
gate:
runs-on: ubuntu-latest
steps:
- name: Check the API contract gate
env:
ACF_API_KEY: ${{ secrets.ACF_API_KEY }} # a key from this service's Setup page
run: |
resp=$(curl -sf -H "x-api-key: $ACF_API_KEY" "https://api-contract-firewall.vercel.app/api/gate")
echo "$resp" | jq .
[ "$(echo "$resp" | jq -r .decision)" = "pass" ]
Store a key from the setup page as the ACF_API_KEY repository secret. The step fails when the gate is blocked (or unreachable).
Evaluation history
| Time | Decision | Open breaking |
|---|
| 11d ago | pass | 0 |
| 11d ago | blocked | 2 |
| 11d ago | blocked | 3 |