[JIRA] (JENKINS-61653) Cannot "Add" credentials when configuring some components at the global level

9 views
Skip to first unread message

aburdajewicz@cloudbees.com (JIRA)

unread,
Mar 23, 2020, 10:26:02 PM3/23/20
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ updated an issue
 
Jenkins / Bug JENKINS-61653
Cannot "Add" credentials when configuring some components at the global level
Change By: Allan BURDAJEWICZ
h3. 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.

h3.
Environments

h3.
Analysis

Digged a bit into this and hopefully could narrow down the problem. This issue seems to happenswhen using {{f:repeatableProperty}} or {{f:repeatable}} to allow adding configuration. It only happens on newly added configuration in the UI: for example in the gloabl config, you must first add a Shared Library and the component you added has a credentials dropdown.

h3. Example of plugins affected:

* [JIRA plugin|https://github.com/jenkinsci/jira-plugin/blob/jira-3.0.12/src/main/resources/hudson/plugins/jira/JiraGlobalConfiguration/config.jelly#L5]
* [TFS Plugin|https://github.com/jenkinsci/tfs-plugin/blob/tfs-5.157.0/tfs/src/main/resources/hudson/plugins/tfs/TeamPluginGlobalConfig/config.groovy#L10]
* [Pipeline Shared Library|https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/workflow-cps-global-lib-2.15/src/main/resources/org/jenkinsci/plugins/workflow/libs/GlobalLibraries/config.jelly#L34]
* [GitLab plugin|https://github.com/jenkinsci/gitlab-plugin/blob/gitlab-plugin-1.5.17/src/main/resources/com/dabsquared/gitlabjenkins/connection/GitLabConnectionConfig/config.jelly]

Apparently it does not affect plugins that use the {{repeatableHeteroProperty}}:

* [Bitbucket Branch Source plugin|https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/cloudbees-bitbucket-branch-source-2.7.0/src/main/resources/com/cloudbees/jenkins/plugins/bitbucket/endpoints/BitbucketEndpointConfiguration/config.jelly#L6-L12]
* [GitLab Branch Source plugin|https://github.com/jenkinsci/gitlab-branch-source-plugin/blob/gitlab-branch-source-1.4.4/src/main/resources/io/jenkins/plugins/gitlabserverconfig/servers/GitLabServers/config.groovy#L10]
* [GitHub plugin|https://github.com/jenkinsci/github-plugin/blob/v1.29.5/src/main/resources/org/jenkinsci/plugins/github/config/GitHubPluginConfig/config.groovy#L12]

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

h3. 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
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

aburdajewicz@cloudbees.com (JIRA)

unread,
Mar 23, 2020, 10:26:02 PM3/23/20
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ created an issue
Issue Type: Bug Bug
Assignee: Unassigned
Components: core, credentials-plugin
Created: 2020-03-24 02:25
Environment: 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
Priority: Minor Minor
Reporter: Allan BURDAJEWICZ

Issue

It is not possible to add credentials when configuring 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.

Environments

Analysis

Digged a bit into this and hopefully could narrow down the problem. This issue seems to happenswhen using f:repeatableProperty or f:repeatable to allow adding configuration. It only happens on newly added configuration in the UI: for example in the gloabl config, you must first add a Shared Library and the component you added has a credentials dropdown.

Apparently it does not affect plugins that use the repeatableHeteroProperty:

  • 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

aburdajewicz@cloudbees.com (JIRA)

unread,
Mar 23, 2020, 10:28:03 PM3/23/20
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ updated an issue
Change By: Allan BURDAJEWICZ
h3. 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.

h3. Analysis

Digged Digging a bit into this and hopefully , I could narrow down the problem . This : the issue seems to happenswhen using happen when the component that hold the credentials dropdown is created from an {{f:repeatableProperty}} or {{f:repeatable}} to allow adding configuration . It only happens on newly added configuration in the UI: for example in the gloabl global config, you must first add a Shared Library and then the component Shared Library item that you added has a credentials dropdown.
Apparently it does not affect plugins that use the {{repeatableHeteroProperty}}:

* Use a "Modern SCM" and either "Git" or "GitHub"
* Try to add credentials clicking on Add, it does not work..

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

aburdajewicz@cloudbees.com (JIRA)

unread,
Mar 23, 2020, 10:29:02 PM3/23/20
to jenkinsc...@googlegroups.com
Allan BURDAJEWICZ commented on Bug JENKINS-61653
 
Re: Cannot "Add" credentials when configuring some components at the global level

I suppose that using repeatableHetero could be a workaround. But there is a bug here, in either core or credentials-plugin. Also I wonder if the issue https://issues.jenkins-ci.org/browse/JENKINS-39324 does capture the problem ? it does look really specific though.

Reply all
Reply to author
Forward
0 new messages