Kyuri Docs

CI/CD Integration

Use Kyuri CLI in GitHub Actions, GitLab CI, and Docker pipelines

Trigger jobs, wait for results, and gate deployments on test outcomes from any CI/CD platform.

GitHub ActionsGitLab CIDocker

Secrets

Set these in your CI/CD platform's secret store:

SecretDescription
KYURI_TRIGGER_KEYJob-specific trigger key (sck_trigger_*) for kyuri job trigger
KYURI_TOKENCLI token (sck_live_*) for general API commands and job trigger --wait

Pass the job ID as the argument to kyuri job trigger; the CLI does not read a default job ID from an environment variable. Cloud users need no URL setting.

Pipelines

Manual setup

.github/workflows/e2e.yml
name: E2E Tests

on:
  push:
    branches: [main]
  pull_request:

jobs:
  e2e:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 24

      - name: Install Kyuri CLI
        run: npm install -g @kyuri-ai/cli

      - name: Run E2E Tests
        run: kyuri --json job trigger ${{ vars.JOB_ID }} --wait
        env:
          KYURI_TRIGGER_KEY: ${{ secrets.KYURI_TRIGGER_KEY }}
          KYURI_TOKEN: ${{ secrets.KYURI_TOKEN }}

      - name: Deploy Config
        if: github.ref == 'refs/heads/main'
        run: kyuri deploy --force
        env:
          KYURI_TOKEN: ${{ secrets.KYURI_TOKEN }}

The step fails the workflow on any non-zero exit code, so a failed, blocked or timed-out run stops the pipeline.

Exit Codes

CodeMeaningCI/CD action
0SuccessContinue pipeline
1General error (test failure, validation)Block deployment
2Auth errorCheck token configuration
3Config errorFix kyuri.config.ts
4API errorCheck connectivity
5TimeoutIncrease --timeout value
130InterruptedStream cancelled with Ctrl+C

In a non-interactive environment, an operation that requires confirmation refuses with exit code 3 and a CONFIRMATION_REQUIRED error. Review the JSON plan, then explicitly pass --force for an authorized write. Authentication failures remain exit code 2.

Best Practices

PracticeHow
Machine-readable resultsUse --json; add --envelope with --json for pagination metadata
Inspect before writingkyuri diff --json or kyuri deploy --dry-run --json
Block until tests finishUse --wait, and set --timeout to suit your suite
Resume a waitkyuri run wait <run-id> never triggers a new run
Least privilegeUse trigger keys (sck_trigger_*) for single-job triggers
Preview config changesRun kyuri diff in PRs
Faster buildsCache the CLI in your CI/CD environment

On this page