Hi,
I had to find out, that something changed in the drone cli with the exec command. It does not pick up secrets any more since 1.6.1:
Given that drone-test.yml:
kind: pipeline
type: docker
name: default
steps:
- name: test
environment:
USERNAME:
from_secret: USERNAME
PASSWORD:
from_secret: PASSWORD
image: alpine
command:
- env
and that secrets.txt:
USERNAME=root
PASSWORD=password
Running
drone-1.5 exec --secret-file=secrets.txt drone-test.yml
gives
[test:0] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
...
[test:19] CI_BUILD_STATUS=success
[test:20] USERNAME=********
[test:21] PASSWORD=********
...
[test:24] HOME=/********
USERNAME
and PASSWORD
are detected as secrets.
Running the same wit hdrone 1.6.1
drone-1.6.1 exec --secret-file=secrets.txt drone-test.yml
gives:
2022/10/31 21:09:59 proto: duplicate proto type registered: PluginSpec
2022/10/31 21:09:59 proto: duplicate proto type registered: PluginPrivilege
No stage specified, assuming 'default'
[test:1] latest: Pulling from library/alpine
[test:2] Digest: sha256:bc41182d7ef5ffc53a40b044e725193bc10142a1243f395ee852a8d9730fc2ad
[test:3] Status: Image is up to date for alpine:latest
...
[test:41] USERNAME=
[test:42] PASSWORD=
[test:43] HOME=/root
So USERNAME
and PASSWORD
are not picked up.
Has the way how to define secrets changed in the mean time?
Any help is appreciated
Stefan