All checks were successful
Build + Deploy / build-ai-sdk (push) Successful in 31s
Build + Deploy / build-developer-portal (push) Successful in 7s
CI/CD / python-lint (push) Has been skipped
CI/CD / nodejs-lint (push) Has been skipped
CI/CD / test-python-backend-compliance (push) Successful in 35s
CI/CD / test-python-dsms-gateway (push) Successful in 19s
Build + Deploy / build-admin-compliance (push) Successful in 8s
Build + Deploy / build-backend-compliance (push) Successful in 8s
Build + Deploy / build-tts (push) Successful in 7s
Build + Deploy / build-document-crawler (push) Successful in 7s
Build + Deploy / build-dsms-gateway (push) Successful in 7s
CI/CD / go-lint (push) Has been skipped
CI/CD / test-go-ai-compliance (push) Successful in 34s
CI/CD / test-python-document-crawler (push) Successful in 23s
CI/CD / validate-canonical-controls (push) Successful in 12s
Build + Deploy / trigger-orca (push) Successful in 2m11s
CI/CD pipeline now uses Orca (build-push-deploy.yml) not Coolify. Updated CLAUDE.md, workflow comments, docs-src, and hetzner compose. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
146 lines
5.9 KiB
Markdown
146 lines
5.9 KiB
Markdown
# CI/CD Pipeline
|
|
|
|
Uebersicht ueber den Deployment-Prozess fuer BreakPilot Compliance.
|
|
|
|
## Uebersicht
|
|
|
|
| Komponente | Build-Tool | Deployment |
|
|
|------------|------------|------------|
|
|
| Frontend (Next.js) | Docker | Orca (automatisch) |
|
|
| Backend (FastAPI) | Docker | Orca (automatisch) |
|
|
| Go Services | Docker (Multi-stage) | Orca (automatisch) |
|
|
| Documentation | MkDocs | Docker (Nginx, lokal) |
|
|
|
|
## Deployment-Architektur
|
|
|
|
```
|
|
┌─────────────────────────────────────────────────────────────────┐
|
|
│ Entwickler-MacBook │
|
|
│ │
|
|
│ breakpilot-compliance/ │
|
|
│ ├── admin-compliance/ (Next.js Dashboard) │
|
|
│ ├── backend-compliance/ (Python FastAPI) │
|
|
│ ├── ai-compliance-sdk/ (Go/Gin) │
|
|
│ ├── developer-portal/ (Next.js) │
|
|
│ └── docs-src/ (MkDocs) │
|
|
│ │
|
|
│ git push origin main && git push gitea main │
|
|
└───────────────────────────────┬─────────────────────────────────┘
|
|
│
|
|
│ git push
|
|
│
|
|
▼
|
|
┌─────────────────────────────────────────────────────────────────┐
|
|
│ Gitea (gitea.meghsakha.com) │
|
|
│ │
|
|
│ Gitea Actions CI: │
|
|
│ ├── test-go-ai-compliance │
|
|
│ ├── test-python-backend-compliance │
|
|
│ ├── test-python-document-crawler │
|
|
│ ├── test-python-dsms-gateway │
|
|
│ └── validate-canonical-controls │
|
|
│ │
|
|
│ Orca Webhook → Build + Deploy (automatisch) │
|
|
└─────────────────────────────────────────────────────────────────┘
|
|
│
|
|
│ auto-deploy
|
|
│
|
|
▼
|
|
┌─────────────────────────────────────────────────────────────────┐
|
|
│ Production (Orca) │
|
|
│ │
|
|
│ ├── admin-dev.breakpilot.ai (Admin Compliance) │
|
|
│ ├── api-dev.breakpilot.ai (Backend API) │
|
|
│ ├── sdk-dev.breakpilot.ai (AI SDK) │
|
|
│ └── developers-dev.breakpilot.ai (Developer Portal) │
|
|
└─────────────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
## Workflow
|
|
|
|
### 1. Code entwickeln und committen
|
|
|
|
```bash
|
|
# Code auf MacBook bearbeiten
|
|
# Committen und zu beiden Remotes pushen:
|
|
git push origin main && git push gitea main
|
|
```
|
|
|
|
### 2. Automatische Tests (Gitea Actions)
|
|
|
|
Push auf gitea triggert automatisch die CI-Pipeline:
|
|
|
|
- **Go Tests:** `ai-compliance-sdk` Unit Tests
|
|
- **Python Tests:** `backend-compliance`, `document-crawler`, `dsms-gateway`
|
|
- **Validierung:** Canonical Controls JSON-Validierung
|
|
- **Lint:** Go, Python, Node.js (nur bei PRs)
|
|
|
|
### 3. Automatisches Deployment (Orca)
|
|
|
|
Nach erfolgreichem Push baut Orca automatisch alle Services und deployt sie.
|
|
|
|
**WICHTIG:** Niemals manuell in Orca auf "Redeploy" klicken!
|
|
|
|
### 4. Health Checks
|
|
|
|
```bash
|
|
# Production Health pruefen
|
|
curl -sf https://api-dev.breakpilot.ai/health
|
|
curl -sf https://sdk-dev.breakpilot.ai/health
|
|
```
|
|
|
|
## CI Pipeline-Konfiguration
|
|
|
|
**Datei:** `.gitea/workflows/ci.yaml`
|
|
|
|
```yaml
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
test-go-ai-compliance: # Go Unit Tests
|
|
test-python-backend: # Python Unit Tests
|
|
test-python-document-crawler:
|
|
test-python-dsms-gateway:
|
|
validate-canonical-controls: # JSON Validierung
|
|
go-lint: # Nur bei PRs
|
|
python-lint: # Nur bei PRs
|
|
nodejs-lint: # Nur bei PRs
|
|
```
|
|
|
|
## Lokale Entwicklung (Mac Mini)
|
|
|
|
Fuer lokale Tests ohne Orca:
|
|
|
|
```bash
|
|
# Auf Mac Mini pullen und bauen
|
|
ssh macmini "git -C ~/Projekte/breakpilot-compliance pull --no-rebase origin main"
|
|
ssh macmini "/usr/local/bin/docker compose -f ~/Projekte/breakpilot-compliance/docker-compose.yml build --no-cache <service>"
|
|
ssh macmini "/usr/local/bin/docker compose -f ~/Projekte/breakpilot-compliance/docker-compose.yml up -d <service>"
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### CI-Status pruefen
|
|
|
|
```bash
|
|
# Im Browser:
|
|
# https://gitea.meghsakha.com/Benjamin_Boenisch/breakpilot-compliance/actions
|
|
```
|
|
|
|
### Container-Logs (lokal)
|
|
|
|
```bash
|
|
ssh macmini "/usr/local/bin/docker logs -f bp-compliance-<service>"
|
|
```
|
|
|
|
### Build-Fehler
|
|
|
|
```bash
|
|
# Lokalen Build-Cache leeren
|
|
ssh macmini "/usr/local/bin/docker builder prune -a"
|
|
```
|