jenkinsapi icon indicating copy to clipboard operation
jenkinsapi copied to clipboard

Folder specific credentials

Open zagy opened this issue 4 years ago • 1 comments

ISSUE TYPE
  • Feature Idea
Jenkinsapi 0.3.11
Jenkins 2.268
SUMMARY

Jenkins supports credentials which are scoped to a folder. This is handy so not expose credentials to otherwise unauthorised users.

EXPECTED RESULTS

Some way to access the credentials, e.g.

jenkins['my-folder'].credentials
ACTUAL RESULTS

No obvious way to get/set folder specific credencials

USEFUL INFORMATION

This can currently be achieved via

url = f'{j.baseurl}/job/{folder}/credentials/store/folder/domain/_/'
credentials = Credentials2x(url, j)

zagy avatar Nov 27 '20 13:11 zagy

@zagy maybe you want to try https://api4jenkins.readthedocs.io/en/latest/user/example.html#credential

joelee2012 avatar Jan 07 '21 07:01 joelee2012