Hi there! So I’ve installed Drone helm chart following the instructions in the chart repo, and it seems to be running just fine (note: there’s just one pod running, the server, no agents, even though agent configuration is still present in values.yaml).
Now, my next step would be to run the build, of course, and to do that, I need to pass some environment variables down to the build process. The problem is, I have tried various different approaches, but still couldn’t get through. Here’s the pipeline that I have:
--- kind: pipeline name: drone-test-pipeline steps: - name: build image: alpine environment: USERNAME: from_secret: username PASSWORD: from_secret: password SOME_VAR: from_secret: somevar commands: - set - echo Username is [$USERNAME] - echo Password is [$PASSWORD] - echo Some var is [$SOME_VAR] trigger: branch: - drone-test --- kind: secret name: USERNAME get: path: samplesecret name: username --- kind: secret name: PASSWORD get: path: samplesecret name: password
I have, of course, created a “samplesecret” resource in the same namespace:
kind: Secret apiVersion: v1 metadata: name: samplesecret namespace: drone data: password: cGFzc3dvcmQ= username: YWRtaW4= type: Opaque
In addition, I’ve also created a “somevar” secret using drone CLI. Unfortunately, this is the only one that gets output via the echo, and that too, as ‘********’
+ echo Username is [$USERNAME] Username is  + echo Password is [$PASSWORD] Password is  + echo Some var is [$SOME_VAR] Some var is [********]
What am I doing wrong?