Is it possible to access credentials from managed files?

341 views
Skip to first unread message

Jochen Fuerbacher

unread,
May 23, 2016, 2:34:44 AM5/23/16
to Jenkins Developers
Hello,

I was wondering if it is possible to access the credentials of a user from managed files (e.g. parameters / variables).
The managed file (Managed script file) needs to curl a url with a username:token combination and I don't want to hardcode this combination in the script.

Thank you.

Cyrille Le Clerc

unread,
May 23, 2016, 4:37:38 AM5/23/16
to Jenkins Developers
Hello Jochen,


The former should let you use environment variables, the latter should let you store the credentials in a file (cleaned up at the end of the build). I think that the former makes more sense for your use case.

Cyrille

Jochen Fuerbacher

unread,
May 23, 2016, 4:59:13 AM5/23/16
to Jenkins Developers
Hello Cyrille,

thanks for your answer.
The problem is, that the user has to activate the credentials binding plugin, select the credentials and a variable name, and insert the variable name as argument in the managed script each time he creates a new job. This is a little bit cumbersome.
It would be great to have the functionality of Credentials Binding Plugin in Managed Files configuration, so that the user only has to chose the managed script, but not the credentials.

Jochen
Reply all
Reply to author
Forward
0 new messages