'use client' import type { WoodpeckerStatus, WoodpeckerPipeline } from '../types' interface WoodpeckerTabProps { woodpeckerStatus: WoodpeckerStatus | null triggeringWoodpecker: boolean triggerWoodpeckerPipeline: () => Promise } export function WoodpeckerTab({ woodpeckerStatus, triggeringWoodpecker, triggerWoodpeckerPipeline, }: WoodpeckerTabProps) { return (
{/* Woodpecker Status Header */}

Woodpecker CI Pipeline

{woodpeckerStatus?.status === 'online' ? 'Online' : 'Offline'}
Woodpecker UI
{/* Pipeline Stats */} {/* Pipeline List */} {woodpeckerStatus?.pipelines && woodpeckerStatus.pipelines.length > 0 ? (

Pipeline Historie

{woodpeckerStatus.pipelines.map((pipeline) => ( ))}
) : (

Keine Pipelines gefunden

Starte eine neue Pipeline oder pruefe die Woodpecker-Konfiguration

)} {/* Pipeline Configuration Info */}

Pipeline Konfiguration

{`Woodpecker CI Pipeline (.woodpecker/main.yml)
     |
     +-- 1. go-lint          -> Go Linting (PR only)
     +-- 2. python-lint      -> Python Linting (PR only)
     +-- 3. secrets-scan     -> GitLeaks Secrets Scan
     |
     +-- 4. test-go-consent  -> Go Unit Tests
     +-- 5. test-go-billing  -> Billing Service Tests
     +-- 6. test-go-school   -> School Service Tests
     +-- 7. test-python      -> Python Backend Tests
     |
     +-- 8. build-images     -> Docker Image Build
     +-- 9. generate-sbom    -> SBOM Generation (Syft)
     +-- 10. vuln-scan       -> Vulnerability Scan (Grype)
     +-- 11. container-scan  -> Container Scan (Trivy)
     |
     +-- 12. sign-images     -> Cosign Image Signing
     +-- 13. attest-sbom     -> SBOM Attestation
     +-- 14. provenance      -> SLSA Provenance
     |
     +-- 15. deploy-prod     -> Production Deployment`}
        
{/* Workflow Anleitung */}
) } // ============================================================================ // Sub-components // ============================================================================ function WoodpeckerStats({ pipelines }: { pipelines: WoodpeckerPipeline[] }) { return (
Gesamt

{pipelines.length}

Erfolgreich

{pipelines.filter(p => p.status === 'success').length}

Fehlgeschlagen

{pipelines.filter(p => p.status === 'failure' || p.status === 'error').length}

Laufend

{pipelines.filter(p => p.status === 'running' || p.status === 'pending').length}

) } function PipelineCard({ pipeline }: { pipeline: WoodpeckerPipeline }) { const borderClass = pipeline.status === 'success' ? 'border-green-200 bg-green-50/30' : pipeline.status === 'failure' || pipeline.status === 'error' ? 'border-red-200 bg-red-50/30' : pipeline.status === 'running' ? 'border-blue-200 bg-blue-50/30' : 'border-slate-200 bg-white' return (
Pipeline #{pipeline.number} {pipeline.status}
{pipeline.branch} {pipeline.commit} {pipeline.event}
{pipeline.message && (

{pipeline.message}

)} {/* Steps Progress */} {pipeline.steps && pipeline.steps.length > 0 && (
{pipeline.steps.map((step, i) => (
))}
{pipeline.steps.map((step, i) => ( {step.name} ))}
)} {/* Errors */} {pipeline.errors && pipeline.errors.length > 0 && (
Fehler:
    {pipeline.errors.map((err, i) => (
  • {err}
  • ))}
)}

{new Date(pipeline.created * 1000).toLocaleDateString('de-DE')}

{new Date(pipeline.created * 1000).toLocaleTimeString('de-DE')}

{pipeline.started && pipeline.finished && (

Dauer: {Math.round((pipeline.finished - pipeline.started) / 60)}m

)}
) } function WorkflowGuide() { return (

Workflow-Anleitung

Automatisch (bei jedem Push/PR):
  • - Linting - Code-Qualitaet pruefen (nur PRs)
  • - Unit Tests - Go & Python Tests
  • - Test-Dashboard - Ergebnisse werden gesendet
  • - Backlog - Fehlgeschlagene Tests werden erfasst
Manuell (Button oder Tag):
  • - Docker Builds - Container erstellen
  • - SBOM/Scans - Sicherheitsanalyse
  • - Deployment - In Produktion deployen
  • - Pipeline starten - Diesen Button verwenden
Setup: API Token konfigurieren

Um Pipelines ueber das Dashboard zu starten, muss ein WOODPECKER_TOKEN konfiguriert werden:

  1. Woodpecker UI oeffnen: http://macmini:8090
  2. Mit Gitea-Account einloggen
  3. Klick auf Profil → User SettingsPersonal Access Tokens
  4. Neues Token erstellen und in .env eintragen: WOODPECKER_TOKEN=...
  5. Container neu starten: docker compose up -d admin-v2
) }