[JIRA] (JENKINS-27512) Support icons for folders

25 views
Skip to first unread message

roman.donchenko@intel.com (JIRA)

unread,
Jan 25, 2019, 4:32:02 AM1/25/19
to jenkinsc...@googlegroups.com
Roman Donchenko commented on New Feature JENKINS-27512
 
Re: Support icons for folders

I'd like to reopen this, because now there are open source plugins with folder icon implementations:

  • The Multi-Branch Project plugin has "Aggregate Ball Color Status Icon (All Jobs)" and "Aggregate Ball Color Status Icon (Select Jobs)".
  • The Branch API plugin has "Metadata Folder Icon".
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

roman.donchenko@intel.com (JIRA)

unread,
Jan 25, 2019, 4:33:10 AM1/25/19
to jenkinsc...@googlegroups.com
Roman Donchenko reopened an issue
 
Jenkins / New Feature JENKINS-27512
Support icons for folders
Change By: Roman Donchenko
Resolution: Won't Fix
Status: Closed Reopened

mail@daniel-spilker.com (JIRA)

unread,
Jun 14, 2019, 7:00:02 AM6/14/19
to jenkinsc...@googlegroups.com
Daniel Spilker assigned an issue to Roman Donchenko
 

Where can I find these options in the UI?

Change By: Daniel Spilker
Assignee: Daniel Spilker Roman Donchenko

roman.donchenko@intel.com (JIRA)

unread,
Jun 17, 2019, 5:56:01 AM6/17/19
to jenkinsc...@googlegroups.com

They're in the Configure page for a folder, under Appearance -> Icon.

roman.donchenko@intel.com (JIRA)

unread,
Jun 17, 2019, 5:56:02 AM6/17/19
to jenkinsc...@googlegroups.com
Roman Donchenko assigned an issue to Daniel Spilker
Change By: Roman Donchenko
Assignee: Roman Donchenko Daniel Spilker

mail@daniel-spilker.com (JIRA)

unread,
Jun 18, 2019, 4:52:01 AM6/18/19
to jenkinsc...@googlegroups.com
Daniel Spilker assigned an issue to Roman Donchenko
 

The is no "Appearance" section on the configure page. That must be provided by some plugin. Please describe which plugins needs to be installed and configured on a fresh Jenkins docker instance.

Change By: Daniel Spilker
Assignee: Daniel Spilker Roman Donchenko

roman.donchenko@intel.com (JIRA)

unread,
Jun 18, 2019, 5:59:02 AM6/18/19
to jenkinsc...@googlegroups.com
Roman Donchenko assigned an issue to Daniel Spilker
Change By: Roman Donchenko
Assignee: Roman Donchenko Daniel Spilker

roman.donchenko@intel.com (JIRA)

unread,
Jun 18, 2019, 5:59:02 AM6/18/19
to jenkinsc...@googlegroups.com

That's odd... all you need to install are the Folders and Multi-Branch Project plugins. Then just create a folder, and "Appearance" will be the first section on the configure page.

And here is where this section is defined in the code.

mail@daniel-spilker.com (JIRA)

unread,
Jun 18, 2019, 9:14:02 AM6/18/19
to jenkinsc...@googlegroups.com
Daniel Spilker assigned an issue to Roman Donchenko
Change By: Daniel Spilker
Assignee: Daniel Spilker Roman Donchenko

roman.donchenko@intel.com (JIRA)

unread,
Jun 18, 2019, 11:03:02 AM6/18/19
to jenkinsc...@googlegroups.com

mail@daniel-spilker.com (JIRA)

unread,
Jun 25, 2019, 12:12:03 AM6/25/19
to jenkinsc...@googlegroups.com

Roman Donchenko the multi-branch-project-plugin is deprecated. Are there any other non-deprecated icon types? I do not want to add a feature that is supported by a deprecated plugin only.

roman.donchenko@intel.com (JIRA)

unread,
Jun 25, 2019, 5:52:02 AM6/25/19
to jenkinsc...@googlegroups.com

branch-api-plugin is not deprecated, and neither is MetadataActionFolderIcon that is defined in it.

mail@daniel-spilker.com (JIRA)

unread,
Jul 4, 2019, 2:56:02 AM7/4/19
to jenkinsc...@googlegroups.com

Roman Donchenko yes, but then there is only one icon, which is the default icon. So, there no icon to choose from. And thus no reason to add DSL for configuration. Or am I missing something?

roman.donchenko@intel.com (JIRA)

unread,
Jul 4, 2019, 6:23:02 AM7/4/19
to jenkinsc...@googlegroups.com

No, there should be at least two:

mail@daniel-spilker.com (JIRA)

unread,
Aug 26, 2019, 7:49:02 AM8/26/19
to jenkinsc...@googlegroups.com
Daniel Spilker updated New Feature JENKINS-27512
 
import com.cloudbees.hudson.plugins.folder.Folder
import com.cloudbees.hudson.plugins.folder.FolderIconDescriptor
import org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject
import jenkins.branch.OrganizationFolder

println FolderIconDescriptor.all()
println Jenkins.instance.getDescriptor(Folder).getIconDescriptors()
println Jenkins.instance.getDescriptor(WorkflowMultiBranchProject).getIconDescriptors()
println Jenkins.instance.getDescriptor(OrganizationFolder).getIconDescriptors()

Running script above in Jenkins script console gives the following result:

[com.cloudbees.hudson.plugins.folder.icons.StockFolderIcon$DescriptorImpl@7ea8a389, jenkins.branch.MetadataActionFolderIcon$DescriptorImpl@78f62ff4]
[com.cloudbees.hudson.plugins.folder.icons.StockFolderIcon$DescriptorImpl@7ea8a389]
[jenkins.branch.MetadataActionFolderIcon$DescriptorImpl@78f62ff4]
[jenkins.branch.MetadataActionFolderIcon$DescriptorImpl@78f62ff4]

There are two known folder icons, but only one applies for each kind of folder.

Multi branch projects allow only MetadataActionFolderIcon, see
https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.5.2.1/src/main/java/jenkins/branch/MultiBranchProjectDescriptor.java#L202-L206

MetadataActionFolderIcon can only be used with multi branch projects and organization folders, but not with "normal" folders, see https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.5.2.1/src/main/java/jenkins/branch/MetadataActionFolderIcon.java#L171-L174

So, again, there is currently no point for adding DSL support. We can revise this when there are icons to choose from.

Change By: Daniel Spilker
Status: Reopened Fixed but Unreleased
Assignee: Roman Donchenko Daniel Spilker
Resolution: Won't Fix

mail@daniel-spilker.com (JIRA)

unread,
Mar 11, 2020, 9:43:03 AM3/11/20
to jenkinsc...@googlegroups.com
Change By: Daniel Spilker
Status: Fixed but Unreleased Closed
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages