Skip to main content
Version: 2.0

CICD Gateway

Service: cicd-gateway · Port: 8087 · Database schema: cicd

cicd-gateway connects your CI systems to KubeOpera. It receives webhooks from GitHub and GitLab and direct reports from any CI tool, stores every pipeline run with its stages, and publishes CI/CD events so the rest of the platform can relate problems to the changes that caused them.

For the user's view, see Pipelines.

Domain model​

Pipeline
├── id, tenant_id, name, repository, branch
├── provider: github | gitlab | generic
└── trigger_events: [push, pull_request, manual, schedule]

PipelineRun
├── id, pipeline_id
├── status: queued | running | success | failed | cancelled
├── trigger_type, commit, branch, author, message
├── stages: []StageRun
└── started_at, finished_at, duration_secs

StageRun
└── id, name, status, started_at, finished_at,
error_message, log_excerpt, exit_code, log_url

Two ways in​

Webhooks​

ProviderEndpointVerified with
GitHubPOST /webhook/githubX-Hub-Signature-256 — HMAC-SHA256 with the pipeline's webhook secret.
GitLabPOST /webhook/gitlabX-Gitlab-Token — the pipeline's webhook token.

Each pipeline has its own webhook secret, generated when it's created. Webhooks are matched to pipelines by repository name, and GitHub push, workflow_run and check_suite events and GitLab Pipeline Hook events are recorded.

Reporting from your CI​

Any CI system can report runs directly with the pipeline's reporting token:

curl -X PATCH https://kubeopera.example.com/api/cicd/api/v1/runs/{runId} \
-H "X-Pipeline-Token: ${PIPELINE_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"status": "success",
"finished_at": "2026-09-26T14:23:01Z",
"stages": [
{ "name": "build", "status": "success", "duration_secs": 45 },
{ "name": "test", "status": "success", "duration_secs": 120 },
{ "name": "deploy", "status": "success", "duration_secs": 18 }
]
}'

See Pipelines: connect your CI for complete examples.

Events​

Published to the cicd.events exchange:

Routing keyWhen
cicd.{provider}.run_startedA run starts.
cicd.{provider}.run_completedA run succeeds.
cicd.{provider}.run_failedA run fails.
cicd.{provider}.deployedA run that deploys to a cluster finishes.

The observability agent attaches deployment events to telemetry as change markers, and the incident manager links failed runs and recent deploys to incidents.

REST API​

MethodPathDescription
GET · POST/api/v1/pipelinesList or create pipelines.
GET · PATCH · DELETE/api/v1/pipelines/{id}Pipeline detail, update, delete.
POST/api/v1/pipelines/{id}/rotate-secretsRotate the webhook secret and reporting token.
GET · POST/api/v1/pipelines/{id}/runsRun history; create a run (reporting token).
GET/api/v1/pipelines/{id}/runs/findFind a run by commit (?commit=).
PATCH/api/v1/runs/{runId}Update a run and its stages (reporting token).
GET/api/v1/pipelines/summary7-day summary: runs, success rate, failures, average duration.
POST/webhook/github · /webhook/gitlabInbound webhooks.
GET/healthzHealth check.

Users reach the pipeline routes through kubeopera-api, which scopes them to the caller's tenant.

Configuration​

VariableDefaultDescription
DATABASE_URL—PostgreSQL connection.
RABBITMQ_URL—RabbitMQ connection.
SECRET_ENCRYPTION_KEY—Encrypts per-pipeline webhook secrets at rest.
PUBLIC_URL—Public address shown in webhook URLs.
PORT8087HTTP port.