Hi, I’m trying to do something like this:
- Add a secrets to my repo (project/myrepo):
drone secret add --repository project/myrepo --name sonar_host --data foo
drone secret add --repository project/myrepo --name sonar_host2 --data bar
The help for command
drone secret add
:
NAME:
drone secret add - adds a secretUSAGE:
drone secret add [command options] [repo/name]OPTIONS:
–repository value repository name (e.g. octocat/hello-world)
–name value secret name
–data value secret value
–allow-pull-request permit read access to pull requests
–allow-push-on-pull-request permit write access to pull requests (e.g. allow docker push)
- Content of .drone.yml:
kind: pipeline name: constructor steps: - name: docker image: golang:1.8 secrets: [sonar_host, sonar_host2] commands: - env
- Result
+ env
DRONE_BRANCH=feature/test
DRONE_SYSTEM_HOST=cloud.drone.io
…
GOLANG_VERSION=1.8.7
CI_JOB_STATUS=success
in my environment, i can’t find created variables:
SONAR_HOST and SONAR_HOST2