Drone: only do K8s rollout on tag/promote

This commit is contained in:
Garrett Mills 2022-12-09 04:43:49 -06:00
parent 53087f08a5
commit 07167e770a

View File

@ -13,6 +13,10 @@ services:
privileged: true privileged: true
environment: environment:
DOCKER_TLS_CERTDIR: "" DOCKER_TLS_CERTDIR: ""
when:
event:
- tag
- promote
steps: steps:
- name: node.js build - name: node.js build
@ -33,6 +37,10 @@ steps:
DOCKER_HOST: tcp://localhost:2375 DOCKER_HOST: tcp://localhost:2375
DOCKER_REGISTRY: DOCKER_REGISTRY:
from_secret: DOCKER_REGISTRY from_secret: DOCKER_REGISTRY
when:
event:
- tag
- promote
- name: k8s rollout - name: k8s rollout
image: bitnami/kubectl image: bitnami/kubectl
@ -40,3 +48,7 @@ steps:
commands: commands:
- cd deploy && kubectl apply -f . - cd deploy && kubectl apply -f .
- kubectl rollout restart deployment/garrettmills-dev -n default - kubectl rollout restart deployment/garrettmills-dev -n default
when:
event:
- tag
- promote