--- kind: pipeline type: docker name: default volumes: - name: gopath host: path: /usr/local/path/gopath steps: - name: golang-build image: golang:1.17-alpine3.15 volumes: - name: gopath path: /go commands: - echo "hello world" when: target: [ "test","pre" ] - name: prod-deploy image: alpine:3.10 when: condition: ${DRONE_DEPLOY_ENABLED} target: [ "test","pre" ] environment: ENVIRONMENT: "hi"