132 lines
3.4 KiB
YAML
132 lines
3.4 KiB
YAML
# CI/CD Pipeline for sp4-otel-1770445387
|
|
# 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-otel-1770445387/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-otel-1770445387-worker-svc worker-svc=registry.threesix.ai/sp4-otel-1770445387/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-otel-1770445387/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-otel-1770445387-chat-svc chat-svc=registry.threesix.ai/sp4-otel-1770445387/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-otel-1770445387/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-otel-1770445387-auth-svc auth-svc=registry.threesix.ai/sp4-otel-1770445387/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-otel-1770445387"
|
|
- kubectl get deployments -n projects -l app=sp4-otel-1770445387 --no-headers || true
|
|
when:
|
|
branch: main
|
|
event: push
|