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

Service account secret not visible when using folders plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
    • Environment:
      Jenkins version: 2.155
      Google Play Android Publisher Plugin: 1.8
      Google OAuth Credentials plugin: 0.7
      Folders Plugin 6.5.1
    • Similar Issues:

      Description

      When I create secret of type "Google Service account from private key" under folder namespace (folders plugin), and then try to use this secret for Google Play Android Publisher Plugin it is not recognized.

       

      When I create job inside this folder, and try to choose Google Play Account from dropdown list of Upload Android APK to Google Play post action, there is nothing to choose from. When I add Google Service account from private key secret in global namespace (not inside folder) then account is visible and I can use plugin.

      The same situation happen when trying to use it from pipeline script. 

      androidApkUpload googleCredentialsId: 'mysecret', ...
      

       Plugin cannot find credentials when they are located inside folder.

        Attachments

          Issue Links

            Activity

            Hide
            orrc Christopher Orr added a comment -

            Are you able to see the credentials if you're an admin user?

            From a very quick look at the code, it seems like we're just delegating to the Google OAuth Plugin, calling getCredentialsListBox:
            https://github.com/jenkinsci/google-play-android-publisher-plugin/blob/google-play-android-publisher-1.8/src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayBuildStepDescriptor.java#L37-L40

            That plugin just appears to be fetching all available credentials in the system, rather than anything scoped by folder:
            https://github.com/jenkinsci/google-oauth-plugin/blob/google-oauth-plugin-0.8/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotCredentials.java#L133-L155

            So I'm not sure where the problem lies, at the moment…

            Show
            orrc Christopher Orr added a comment - Are you able to see the credentials if you're an admin user? From a very quick look at the code, it seems like we're just delegating to the Google OAuth Plugin, calling getCredentialsListBox : https://github.com/jenkinsci/google-play-android-publisher-plugin/blob/google-play-android-publisher-1.8/src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayBuildStepDescriptor.java#L37-L40 That plugin just appears to be fetching all available credentials in the system, rather than anything scoped by folder: https://github.com/jenkinsci/google-oauth-plugin/blob/google-oauth-plugin-0.8/src/main/java/com/google/jenkins/plugins/credentials/oauth/GoogleRobotCredentials.java#L133-L155 So I'm not sure where the problem lies, at the moment…
            Hide
            shen3lu4 Lu Shen added a comment -

            No even if I log in as a Jenkins admin, I don't see the credential in the drop down. It is simply not available.

            Show
            shen3lu4 Lu Shen added a comment - No even if I log in as a Jenkins admin, I don't see the credential in the drop down. It is simply not available.

              People

              • Assignee:
                orrc Christopher Orr
                Reporter:
                pangorgo Kamil Zegier
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: