Drone: only do K8s rollout on tag/promote
This commit is contained in:
parent
53087f08a5
commit
07167e770a
12
.drone.yml
12
.drone.yml
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user