question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configuring google-oauth-plugin credentials

See original GitHub issue

Informations:

  • [ 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.

JCasC_API_doc

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:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jetersencommented, Mar 26, 2019

I am just linking. 😁 https://github.com/jenkinsci/google-oauth-plugin/pull/19 should fix your issue

1reaction
timjacommented, Mar 25, 2019

No I haven’t, it’s better if a user of the plugin does it, I’ll subscribe to it though

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google OAuth Credentials - Jenkins Plugins
Google OAuth Plugin Documentation ... This plugin implements the OAuth Credentials interfaces for surfacing Google Service Accounts to Jenkins.
Read more >
Jenkins Google OAuth Credentials Plugin - GitHub
Go to Manage Jenkins then Manage Plugins. · (Optional) Make sure the plugin manager has updated data by clicking the Check now button....
Read more >
Configure the OAuth consent screen - Google Developers
In the Google Cloud console, go to Menu menu > APIs & Services > OAuth consent screen. Go to OAuth consent screen. Select...
Read more >
How to set up Google OAuth for G Suite? And ... - ELEXtensions
Click on OAuth consent screen tab and configure the credentials like selecting your G Suite administrator email address, entering your project name, homepage ......
Read more >
Google OAuth plugin for jenkins - Stack Overflow
Login to the Google Developers Console Create a new project Under APIs & Auth -> Credentials, Create a new Client ID The application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found