How to print DRONE_DEPLOY_TO

Hi, after running drone deploy --branch master org/repo 19 STAGING I want to be able to access STAGING in my pipeline. How would I get that so I can use it within my scripts? None of the below work for me. I’m on version 1.0.0-rc.1-linux-amd64 for both agent and server

kind: pipeline
name: default

steps:
- name: testing
  image: busybox
  commands:
  - echo "$${DRONE_DEPLOY_TO}"
  - echo "${DRONE_DEPLOY_TO}"
  - echo "$DRONE_DEPLOY_TO"
  - echo $DRONE_DEPLOY_TO
  - echo $${DRONE_DEPLOY_TO}
  - echo ${DRONE_DEPLOY_TO}

Result

+ echo "${DRONE_DEPLOY_TO}"

+ echo ""

+ echo "$DRONE_DEPLOY_TO"

+ echo $DRONE_DEPLOY_TO

+ echo ${DRONE_DEPLOY_TO}

+ echo

Thanks,
Brett

Well, it turns out I forgot to add this environment variable when I refactored some code! I will push an update later today.

1 Like

Mucho gracias! Thanks for the quick turnaround :slight_smile: