Configuring google-oauth-plugin credentials
See original GitHub issueInformations:
- [ Jenkins ver. 2.164 ] Jenkins version
- [ 1.8 ] Plugin version
- [ Official Jenkins Docker image ] OS
Hi, I recently used JCasC plugin successfully to replace hundreds of groovy initialization lines and I am pretty happy with it. 😃
However, I have trouble translating some specific credential from the google-oauth-plugin(https://github.com/jenkinsci/google-oauth-plugin) into JCasC definition.
So far, I got to this point:
credentials:
system:
domainCredentials:
- credentials:
- googleRobotPrivateKey:
projectId: "<PROJECT ID>"
serviceAccountConfig:
json:
prevJsonKeyFile: '<THE KEY AS A STRING>'
But it just takes the string as the file name (prevJsonKeyFile).
I found an interesting post from a guy which does this in groovy init script: => https://github.com/jenkinsci/google-oauth-plugin/issues/5#issuecomment-393128560
From what I understand, the plugin needs a FileStream to actually process my credential even if, in the JCasC documentation generated on my jenkins instance, it requires a string.
I didn’t found any examples on how to pass on a credential as a file stream with JCasC.
Can someone help me on how to do it? I will be glad to contribute back an example for this use-case when it will work.
Thanks!!!
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I am just linking. 😁 https://github.com/jenkinsci/google-oauth-plugin/pull/19 should fix your issue
No I haven’t, it’s better if a user of the plugin does it, I’ll subscribe to it though