Skip to main content

Automated CI/CD Quality Gates

CertOps is designed to be fully integrated into your existing Software Development Life Cycle (SDLC) as an automated "Gatekeeper".

By incorporating the CertOps CLI into your CI/CD pipelines (e.g., GitHub Actions, GitLab CI, Jenkins), you can automatically block the deployment of degraded AI models or prompt regressions before they ever reach production.

The CLI Runner

The CertOps command-line interface is the engine that actually reads your certops.yaml manifest, executes the requests against your targets, and triggers the asynchronous evaluation workload on the backend.

Execution Command

To trigger a certification run, use the run command from the root directory containing your certops.yaml:

certops run --host "https://staging.mycompany.com"
  • --host: (Required) This is the dynamic environment injection. CertOps will prepend this host to the relative endpoint defined in your manifest's targets.

The Gatekeeper Pattern

The CertOps CLI is specifically built for CI/CD environments. It operates on a strict Exit Code Policy.

When you execute certops run, the CLI will wait for the entire evaluation matrix (defined in the manifest) to complete, then exit with one of three codes:

Exit CodeVerdictMeaning
0CertifiedEvery blocking: true gate passed. The pipeline proceeds to deploy.
1RejectedA blocking: true gate failed. The pipeline halts — a real quality regression.
2System ErrorNo verdict was reached (timeout, API down, auth failure, or Ctrl+C).

The 1 vs 2 distinction is deliberate: an infrastructure blip must never be reported to CI as a model quality regression. Both fail the build, but only 1 means "your model got worse".

Example GitHub Action

Here is a simplified example of how you might inject CertOps into a deployment workflow:

name: AI Quality Gate

on:
pull_request:
branches: [ main ]

jobs:
certify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Spin up ephemeral staging environment
run: ./scripts/start-dev-server.sh &

- name: Install CertOps CLI
run: pip install certops-cli

- name: Authenticate
run: certops login --username "${{ secrets.CERTOPS_USERNAME }}" --password "${{ secrets.CERTOPS_PASSWORD }}"

- name: Run Certification Suite
env:
CERTOPS_API_URL: https://api.certops.ai
INTERNAL_ROUTING_KEY: ${{ secrets.INTERNAL_ROUTING_KEY }}
# This step will FAIL and halt the PR if metrics degrade!
run: certops run --host "http://localhost:8000"