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

Cannot "Add" credentials when configuring some components at the global level

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core, credentials-plugin
    • None
    • Environment 1:

      * Pipeline: Shared Groovy Libraries 2.8
      * core: 2.60.3
      * credentials: 2.1.13

      Environment 2:

      * Pipeline: Shared Groovy Libraries 2.16
      * core: 2.227
      * credentials: 2.3.5

      Issue

      It is not possible to add credentials when configuring for example a shared library from the global configuration Manage Jenkins > Configure System > Global Pipeline Libraries. This is not only impacting Pipeline Shared Library. Other plugins that accepts credentials in the Jenkins global configuration seem to be impacted too.

      Analysis

      Digging a bit into this, I could narrow down the problem: the issue seems to happen when the component that hold the credentials dropdown is created from an f:repeatableProperty or f:repeatable. It only happens on newly added configuration in the UI: for example in the global config, you must first add a Shared Library and then the Shared Library item that you added has a credentials dropdown.

      Example of plugins affected:

      Apparently it does not affect plugins that use the repeatableHeteroProperty:

      How to reproduce

      • Start a new Jenkins instance with no global credentials.
      • Go to Manage Jenkins > Configure System > Global Pipeline Libraries
      • Add a library
      • Use a "Modern SCM" and either "Git" or "GitHub"
      • Try to add credentials clicking on Add, it does not work..

      Workarounds

      1. Create credentials from Manage Jenkins > Manage Credentials and then the credentials will be selectable in the global configuration.
      2. Partially fill the information for the shared library (without the credentials), save the configuration, go back to the configuration. It is now possible to "Add" credentials

            Unassigned Unassigned
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: