30 lines
898 B
YAML
30 lines
898 B
YAML
# 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]
|