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 CIDockerSecrets
Set these in your CI/CD platform's secret store:
| Secret | Description |
|---|---|
KYURI_TRIGGER_KEY | Job-specific trigger key (sck_trigger_*) for kyuri job trigger |
KYURI_TOKEN | CLI 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
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
| Code | Meaning | CI/CD action |
|---|---|---|
0 | Success | Continue pipeline |
1 | General error (test failure, validation) | Block deployment |
2 | Auth error | Check token configuration |
3 | Config error | Fix kyuri.config.ts |
4 | API error | Check connectivity |
5 | Timeout | Increase --timeout value |
130 | Interrupted | Stream 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
| Practice | How |
|---|---|
| Machine-readable results | Use --json; add --envelope with --json for pagination metadata |
| Inspect before writing | kyuri diff --json or kyuri deploy --dry-run --json |
| Block until tests finish | Use --wait, and set --timeout to suit your suite |
| Resume a wait | kyuri run wait <run-id> never triggers a new run |
| Least privilege | Use trigger keys (sck_trigger_*) for single-job triggers |
| Preview config changes | Run kyuri diff in PRs |
| Faster builds | Cache the CLI in your CI/CD environment |