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

Google play android publisher - credentials not working through JCasC

      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

          [JENKINS-61809] Google play android publisher - credentials not working through JCasC

          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

          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

          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).

          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).

          Thank you!

          It works now.

          Nada Bourounia added a comment - Thank you! It works now.

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

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

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

              Created:
              Updated:
              Resolved: