# CI/CD Pipeline for sp4-fresh # Components will add their build steps below the marker clone: git: image: woodpeckerci/plugin-git settings: depth: 1 steps: deps: image: golang:1.23 commands: - go work sync - | for dir in services/*/; do if [ -f "$dir/go.mod" ]; then (cd "$dir" && go mod tidy) fi done - | for dir in workers/*/; do if [ -f "$dir/go.mod" ]; then (cd "$dir" && go mod tidy) fi done - | for dir in cli/*/; do if [ -f "$dir/go.mod" ]; then (cd "$dir" && go mod tidy) fi done when: branch: main event: push # COMPONENT_STEPS_BELOW # Woodpecker CI step for worker-svc worker # Add this step to your .woodpecker.yml build-worker-svc: depends_on: [deps] image: woodpeckerci/plugin-kaniko settings: registry: registry.threesix.ai repo: sp4-fresh/worker-svc tags: - latest - ${CI_COMMIT_SHA:0:8} context: . dockerfile: workers/worker-svc/Dockerfile cache: true skip-tls-verify: true when: branch: main event: push deploy-worker-svc: image: bitnami/kubectl:latest commands: - kubectl set image deployment/sp4-fresh-worker-svc worker-svc=registry.threesix.ai/sp4-fresh/worker-svc:${CI_COMMIT_SHA:0:8} -n projects || echo "Deployment not found, skipping" when: branch: main event: push # Woodpecker CI step for chat-svc service # Add this step to your .woodpecker.yml build-chat-svc: depends_on: [deps] image: woodpeckerci/plugin-kaniko settings: registry: registry.threesix.ai repo: sp4-fresh/chat-svc tags: - latest - ${CI_COMMIT_SHA:0:8} context: . dockerfile: services/chat-svc/Dockerfile cache: true skip-tls-verify: true when: branch: main event: push deploy-chat-svc: image: bitnami/kubectl:latest commands: - kubectl set image deployment/sp4-fresh-chat-svc chat-svc=registry.threesix.ai/sp4-fresh/chat-svc:${CI_COMMIT_SHA:0:8} -n projects || echo "Deployment not found, skipping" when: branch: main event: push # Woodpecker CI step for auth-svc service # Add this step to your .woodpecker.yml build-auth-svc: depends_on: [deps] image: woodpeckerci/plugin-kaniko settings: registry: registry.threesix.ai repo: sp4-fresh/auth-svc tags: - latest - ${CI_COMMIT_SHA:0:8} context: . dockerfile: services/auth-svc/Dockerfile cache: true skip-tls-verify: true when: branch: main event: push deploy-auth-svc: image: bitnami/kubectl:latest commands: - kubectl set image deployment/sp4-fresh-auth-svc auth-svc=registry.threesix.ai/sp4-fresh/auth-svc:${CI_COMMIT_SHA:0:8} -n projects || echo "Deployment not found, skipping" when: branch: main event: push # Do not remove the marker above - component steps are inserted here verify: image: bitnami/kubectl:latest commands: - echo "Pipeline complete for sp4-fresh" - kubectl get deployments -n projects -l app=sp4-fresh --no-headers || true when: branch: main event: push