ci: add Woodpecker CI pipeline for Zot registry build and k3s deploy
This commit is contained in:
parent
200b84751e
commit
df2f46e4b7
29
.woodpecker.yml
Normal file
29
.woodpecker.yml
Normal file
@ -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]
|
||||
Loading…
Reference in New Issue
Block a user