Add kubeconfig secret mounting for deploy step to authenticate with Kubernetes cluster. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
37 lines
865 B
YAML
37 lines
865 B
YAML
# CI/CD Pipeline for research-notes
|
|
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
depth: 1
|
|
|
|
steps:
|
|
build:
|
|
image: woodpeckerci/plugin-kaniko
|
|
settings:
|
|
registry: registry.threesix.ai
|
|
repo: research-notes/web
|
|
tags:
|
|
- latest
|
|
- ${CI_COMMIT_SHA:0:8}
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
cache: true
|
|
skip_tls_verify: true
|
|
when:
|
|
branch: main
|
|
event: push
|
|
|
|
deploy:
|
|
image: bitnami/kubectl:latest
|
|
secrets: [kubeconfig]
|
|
commands:
|
|
- mkdir -p ~/.kube
|
|
- echo "$KUBECONFIG" > ~/.kube/config
|
|
- kubectl set image deployment/research-notes web=registry.threesix.ai/research-notes/web:${CI_COMMIT_SHA:0:8} -n projects
|
|
- kubectl rollout status deployment/research-notes -n projects --timeout=120s
|
|
when:
|
|
branch: main
|
|
event: push
|