Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-61809

Google play android publisher - credentials not working through JCasC

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      I'm unable to get the credentials configured properly for Google play Android publisher plugin.

      Can you please confirm the following syntax:

      • googleRobotPrivateKey:
               projectId: "google-play-account"
               serviceAccountConfig:
                  json:
                      filename: "xxx"
                      secretJsonKey: ${GOOGLE_PLAY_KEY}

       

      The key should be base64 encoded?

       

      Thanks in advance,

      Nada

        Attachments

          Issue Links

            Activity

            Hide
            orrc Christopher Orr added a comment -

            Yeah, I don't know how well it's documented in the Google OAuth Credentials plugin, but this worked for me:

            credentials:
              system:
                domainCredentials:
                  - credentials:
                      - googleRobotPrivateKey:
                          projectId: 'Google Play'
                          serviceAccountConfig:
                            json:
                              # Optional
                              filename: 'my-gp-account.json'
                              # The contents of your .json file from Google Play, encoded as base 64, e.g.:
                              #   $ cat api-xxxxxxxxx-xxxxx-xxxx.json | base64 -
                              # You can also provide an environment variable with the same content, to avoid having it in this file
                              secretJsonKey: 'eyJjbGllbnRfZW1haWwiOiJqZW5raW5z […]'
            

            I'll add some documentation for the next version of the Google Play Android Publisher plugin:
            https://github.com/jenkinsci/google-play-android-publisher-plugin/pull/29

            You can see more examples in the Google OAuth Plugin PR that implemented this feature:
            https://github.com/jenkinsci/google-oauth-plugin/pull/48

            Show
            orrc Christopher Orr added a comment - Yeah, I don't know how well it's documented in the Google OAuth Credentials plugin, but this worked for me: credentials: system: domainCredentials: - credentials: - googleRobotPrivateKey: projectId: 'Google Play' serviceAccountConfig: json: # Optional filename: 'my-gp-account.json' # The contents of your .json file from Google Play, encoded as base 64, e.g.: # $ cat api-xxxxxxxxx-xxxxx-xxxx.json | base64 - # You can also provide an environment variable with the same content, to avoid having it in this file secretJsonKey: 'eyJjbGllbnRfZW1haWwiOiJqZW5raW5z […]' I'll add some documentation for the next version of the Google Play Android Publisher plugin: https://github.com/jenkinsci/google-play-android-publisher-plugin/pull/29 You can see more examples in the Google OAuth Plugin PR that implemented this feature: https://github.com/jenkinsci/google-oauth-plugin/pull/48
            Hide
            orrc Christopher Orr added a comment -

            There's now an example in the README.

            I think it will appear on the plugins site after the next plugin release (at the latest).

            Show
            orrc Christopher Orr added a comment - There's now an example in the README . I think it will appear on the plugins site after the next plugin release (at the latest).
            Hide
            nadbour Nada Bourounia added a comment -

            Thank you!

            It works now.

            Show
            nadbour Nada Bourounia added a comment - Thank you! It works now.
            Hide
            orrc Christopher Orr added a comment -

            The README changes were automatically picked up by the Jenkins plugins site a while ago.

            Show
            orrc Christopher Orr added a comment - The README changes were automatically picked up by the Jenkins plugins site a while ago.

              People

              Assignee:
              orrc Christopher Orr
              Reporter:
              nadbour Nada Bourounia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: