Files
frontend/.drone.yml
cdchen 76539797a5
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Add Kubernetes Helm deployment pipeline
2026-06-20 02:00:45 +08:00

28 lines
684 B
YAML

kind: pipeline
type: docker
name: frontend-k8s
clone:
depth: 50
trigger:
branch:
- k8s
event:
- push
steps:
- name: build-image
image: docker.m.daocloud.io/library/docker:27-cli
commands:
- docker build -t cdchen-frontend:k8s-${DRONE_COMMIT_SHA:0:8} .
- name: deploy-k8s
image: cdchen-k8s-tools:latest
network_mode: teaching-k8s
environment:
HOME: /home/cdchen
commands:
- minikube image load cdchen-frontend:k8s-${DRONE_COMMIT_SHA:0:8} -p teaching-k8s
- helm upgrade --install frontend ./chart --namespace demo --create-namespace --set image.repository=cdchen-frontend --set image.tag=k8s-${DRONE_COMMIT_SHA:0:8}