diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..5458f9e --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,29 @@ +# StemeDB CI/CD Pipeline +# Push to main → Kaniko builds amd64 image → pushes to registry.threesix.ai → kubectl deploy +when: + branch: main + event: push + +steps: + build: + image: woodpeckerci/plugin-kaniko + settings: + registry: registry.threesix.ai + repo: registry.threesix.ai/stemedb-api + tags: + - latest + - ${CI_COMMIT_SHA:0:8} + context: . + dockerfile: Dockerfile + cache: true + cache_repo: registry.threesix.ai/stemedb-api/cache + skip_tls_verify: true + + deploy: + image: bitnami/kubectl:latest + commands: + - mkdir -p ~/.kube && echo "$KUBECONFIG" > ~/.kube/config + - kubectl set image deployment/stemedb-api stemedb-api=registry.threesix.ai/stemedb-api:${CI_COMMIT_SHA:0:8} -n stemedb + - kubectl rollout status deployment/stemedb-api -n stemedb --timeout=300s + secrets: [kubeconfig] + depends_on: [build]