Go to file
Daniel Samson aa986a470e
Publish Image / publish (push) Successful in 15s Details
Remove log viewer app, output goes to agent logs directly
The startup script already writes to stdout which the Coder agent
captures. No need for a separate HTTP log server or coder_app button.
Logs are visible via the Coder web terminal or agent log viewer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-12 14:18:00 +01:00
.gitea/workflows Custom workspace image + fix slash command invocation 2026-04-12 14:15:17 +01:00
coder Remove log viewer app, output goes to agent logs directly 2026-04-12 14:18:00 +01:00
k8s Fix cert-manager ClusterIssuer name to letsencrypt-prod 2026-04-12 13:02:08 +01:00
src Reconcile queue state on startup, remove age-based staleness check 2026-04-12 14:01:56 +01:00
.gitignore Initial commit: SDLC Orchestrator replacing n8n 2026-04-12 12:44:28 +01:00
Dockerfile Initial commit: SDLC Orchestrator replacing n8n 2026-04-12 12:44:28 +01:00
README.md Initial commit: SDLC Orchestrator replacing n8n 2026-04-12 12:44:28 +01:00
package-lock.json Initial commit: SDLC Orchestrator replacing n8n 2026-04-12 12:44:28 +01:00
package.json Initial commit: SDLC Orchestrator replacing n8n 2026-04-12 12:44:28 +01:00
tsconfig.json Initial commit: SDLC Orchestrator replacing n8n 2026-04-12 12:44:28 +01:00

README.md

SDLC Orchestrator

Lightweight webhook-driven orchestrator that replaces n8n for the Gitea + Coder + Claude Code SDLC pipeline.

Receives Gitea webhooks, routes them to the correct SDLC stage, creates Coder workspaces, and posts status comments back on issues/PRs.

Architecture

Gitea Webhooks → SDLC Orchestrator → Coder API (creates workspace)
                                   → Gitea API (posts comments)

~500 lines of TypeScript. No database, no UI, no state — just a webhook router.

Webhook Endpoints

Endpoint Gitea Event Action
POST /webhook/gitea-issue-triage Issue opened Route to analyse or fix-bug
POST /webhook/gitea-issue-label Issue labeled Stage transition (architect/develop/test/devops)
POST /webhook/gitea-issue-comment Comment created Re-trigger analyst if still in analysis
POST /webhook/gitea-pr-review PR opened/synced Trigger code review
POST /webhook/gitea-pr-review-rework Review submitted Route to rework-pr or test
POST /webhook/gitea-release Release issue Tag RC or production release
GET /health Health check

Plus a cron job (Monday 9 AM) for weekly maintenance.

Setup

Prerequisites

  • Node.js 22+
  • Coder running with the cloudflare-worker template (see coder/)
  • Gitea with two bot accounts: claude-dev and claude-review

Environment Variables

Variable Required Description
PORT No HTTP port (default: 3000)
CODER_URL Yes Coder API base URL
CODER_TOKEN Yes Coder session token
CODER_TEMPLATE_ID Yes Coder workspace template ID
GITEA_DEV_TOKEN Yes Gitea API token for claude-dev
GITEA_REVIEW_TOKEN Yes Gitea API token for claude-review
ANTHROPIC_API_KEY Yes Anthropic API key for Claude Code
GITEA_URL No Gitea base URL (default: https://gitea.samson.media)
BOT_DEV_USERNAME No Dev bot username (default: claude-dev)
BOT_REVIEW_USERNAME No Review bot username (default: claude-review)
MAINTENANCE_REPOS No Comma-separated org/repo=clone_url for weekly maintenance

Local Development

npm install
cp k8s/secret.yaml.example .env  # Edit with real values (use KEY=value format)
npm run dev

Deploy to k3s

# Build and push image
docker build -t registry.samson.media/sdlc-orchestrator:latest .
docker push registry.samson.media/sdlc-orchestrator:latest

# Create secrets
cp k8s/secret.yaml.example k8s/secret.yaml
# Edit k8s/secret.yaml with real values
kubectl apply -f k8s/secret.yaml

# Deploy
kubectl apply -f k8s/deployment.yaml

Configure Gitea Webhooks

For each project, add these webhooks in Settings → Webhooks:

Event URL
Issues (opened) https://sdlc.samson.media/webhook/gitea-issue-triage
Issues (labeled) https://sdlc.samson.media/webhook/gitea-issue-label
Issue Comments (created) https://sdlc.samson.media/webhook/gitea-issue-comment
Pull Request (opened, synchronized) https://sdlc.samson.media/webhook/gitea-pr-review
Pull Request Review (submitted) https://sdlc.samson.media/webhook/gitea-pr-review-rework
Issues (opened, labeled) — releases https://sdlc.samson.media/webhook/gitea-release

Coder Template

The coder/ directory contains the Terraform template for ephemeral Kubernetes workspaces. See coder/README.md.

Migrating from n8n

  1. Deploy this service to k3s
  2. Update Gitea webhooks to point to sdlc.samson.media instead of n8n.samson.media
  3. Verify with a test issue
  4. Decommission n8n