Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Can I have job scope Credentials in Jenkins?

First sorry if this question and its solution exist somewhere but I cannot find it.

I would like to be able to create credentials inside a job and only usable inside this job, a kind of job scope credential.

For the moment Credential plugins only propose Global and System scope so the credentials are avaialble to all jobs.

The Credentials Binding Plugin does not seem to solve my problem either but to be fair, I am not sure to understand all its features and I would prefer not use text or file provider.

I use jenkins 1.589 Credential Plugin 1.18

Regards

like image 950
Simon Avatar asked Nov 24 '14 10:11

Simon


1 Answers

Using the Folders plugin in conjunction with the Credentials Binding plugin:

The Credentials plugin is folder-aware and will enhance the Configure page for Folders with a Credentials section. Credentials defined on a folder can only be used by builds within that folder.

You can further secure access to credentials to only specific users in your organization by combining the Credentials and Folder plugins with the Role Based Access Control plugin.

Source: https://support.cloudbees.com/hc/en-us/articles/203802500-Injecting-Secrets-into-Jenkins-Build-Jobs#usingfolderstocontrolcredentialusage

like image 94
RRT Avatar answered Sep 16 '22 21:09

RRT