Skip to main content
All recipes

GitLab CI.

CLICLIMR gate

Drop the CLI into a GitLab job. Use merge request rules to scope the gate to PRs against `main`, and a scheduled pipeline for the regression check.

Add the gate to .gitlab-ci.yml.

.gitlab-ci.yml
upstream-health:
  image: node:20
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_PIPELINE_SOURCE == "schedule"
  script:
    - npx @checkupstream/cli scan
    - npx @checkupstream/cli risk --fail-on critical
  variables:
    CHECKUPSTREAM_API_TOKEN: $CHECKUPSTREAM_API_TOKEN

Ship reliable upstream.

Drop the SDK in, point it at your project key, and start seeing live upstream telemetry inside the dashboard.