Files
backend/.drone.yml

30 lines
761 B
YAML
Raw Normal View History

kind: pipeline
type: docker
name: backend-k8s
clone:
2026-06-20 00:11:19 +08:00
depth: 50
trigger:
branch:
- k8s
event:
- push
steps:
- name: build-image
image: docker.m.daocloud.io/library/docker:27-cli
pull: if-not-exists
commands:
- docker build -t 127.0.0.1:5000/cdchen-backend:k8s-${DRONE_COMMIT_SHA:0:8} .
- docker push 127.0.0.1:5000/cdchen-backend:k8s-${DRONE_COMMIT_SHA:0:8}
- name: deploy-k8s
image: cdchen-k8s-tools:latest
pull: if-not-exists
network_mode: teaching-k8s
environment:
HOME: /home/cdchen
commands:
- helm upgrade --install backend ./chart --namespace demo --create-namespace --set image.repository=host.minikube.internal:5000/cdchen-backend --set image.tag=k8s-${DRONE_COMMIT_SHA:0:8}