parameter of type “Secret file” is passed as credentials ID instead of a path

254 views
Skip to first unread message

Ilia Basin

unread,
Jan 31, 2018, 11:09:58 AM1/31/18
to Jenkins Users
Hi group. Dupping my SO question here.
https://stackoverflow.com/questions/48543528/parameter-of-type-secret-file-is-passed-as-credentials-id-instead-of-a-path


My job has a parameter of type Credentials/Secret file. I have created a global secret file credential and attached some file to it. When I run the job, the value of the corresponding environment variable is the ID of the credential, not the path to the secret file.

Test Server1: Jenkins 1.644, Credentials plugin 2.1.16, Plain Credentials Plugin 1.4

Test Server2: Jenkins 2.32.2, Credentials plugin 2.1.13, Plain Credentials Plugin 1.4, Credentials Binding Plugin 1.10


${JENKINS_HOME}/secretFiles/ did not exist, manual creation didn't help.


I can't find any similar bug on https://issues.jenkins-ci.org


jenk1

jenk2


+ . /tmp/hudson338763205566727503.sh
++ echo DEPLOY_ENV_XML=281a5ed3-f911-4880-ad15-aab874f951fb
DEPLOY_ENV_XML=281a5ed3-f911-4880-ad15-aab874f951fb
++ cat 281a5ed3-f911-4880-ad15-aab874f951fb
cat: 281a5ed3-f911-4880-ad15-aab874f951fb: No such file or directory
Build step 'Execute shell' marked build as failure
Finished: FAILURE

Ilia Basin

unread,
Jan 31, 2018, 3:26:43 PM1/31/18
to Jenkins Users
Nevermind: I haven't noticed the "Use secret text(s) or file(s)" checkbox which appeared after installing the Credentials Binding Plugin.

среда, 31 января 2018 г., 19:09:58 UTC+3 пользователь Ilia Basin написал:
Reply all
Reply to author
Forward
0 new messages