infrastructure/.drone.yml

36 lines
742 B
YAML

kind: pipeline
type: docker
name: kubernetes
trigger:
branch:
- main
event:
- push
steps:
- name: kubectl
image: bitnami/kubectl
environment:
KUBE_CONFIG:
from_secret: KUBE_CONFIG
commands:
- echo "$$KUBE_CONFIG" | base64 -d > /.kube/config
- kubectl kustomize ./kustomization/overlays/staging
- kubectl apply -k ./kustomization/overlays/staging
---
kind: pipeline
type: docker
name: Delete all Error pods
steps:
- name: kubectl
image: bitnami/kubectl
environment:
KUBE_CONFIG:
from_secret: KUBE_CONFIG
commands:
- echo "$$KUBE_CONFIG" | base64 -d > /.kube/config
- kubectl delete pods --field-selector=status.phase=Failed --all-namespaces