I’ve been exploring the “Deploy” feature in the Drone GUI and researching promotions. I was able to successfully get it to work however I noticed not only did the deploy trigger step deploy but also other steps that did not have any conditionals also ran under the default section; please see screenshot:
Here is my drone yaml file:
kind: pipeline
name: default
steps:
- name: build
image: node:12.16.1-alpine
commands:
- npm install
---
kind: pipeline
type: docker
name: deploy
steps:
- name: promote-dev
image: nytimes/drone-gke:0.10.1
environment:
TOKEN:
from_secret: xxxxxxxxxxxxxxx
settings:
verbose: true
project: xxxxxxx
zone: us-east1-b
cluster: xxxxxxxxxx
skip_template: true
skip_secret_template: true
commands:
- apk add gettext
- gcloud container clusters get-credentials xxxxxxxxx --zone us-east1-b --project xxxxxx
- envsubst <./kube/overlays/dev/kustomization.yaml >./kube/overlays/dev/kustomization.yaml.out
- mv ./kube/overlays/dev/kustomization.yaml.out ./kube/overlays/dev/kustomization.yaml
- kubectl apply -k kube/overlays/dev/
when:
event:
- promote
target:
- development
I do not want the “build” step to run, only the “promote-dev”. How can I get only what I want to run and nothing else?