-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
Seems like someone else asked about this some years ago on stackoverflow as well: https://stackoverflow.com/questions/49117063/jenkins-github-org-last-build-status-icon
I dug a bit deeper and found this plugin: https://plugins.jenkins.io/custom-folder-icon/
I can set the folder icon of the organisation which works perfectly:
But the generated multibranch-folders for each github-repo still contain the default icon:
Which can not be changed because the setting is read-only:
Which seems to be by design: https://issues.jenkins.io/browse/JENKINS-33900
Thus I tried to modify the /var/lib/jenkins/jobs/invesdwin/jobs/invesdwin-aspects/config.xml on the server directly from:
<icon class="jenkins.branch.MetadataActionFolderIcon" plugin="branch-api@2.1046.v0ca_37783ecc5"> <owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/> </icon>
to:
<icon class="jenkins.plugins.foldericon.BuildStatusFolderIcon" plugin="custom-folder-icon@2.3"> <owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/> </icon>
But neither restarting jenkins, nor calling https://jenkins_server/jenkins/reload for live reload seems to apply these changes. I guess this plugin somehow overrides this at runtime.
I think this setting can not be changed via a Jenkinsfile, because any property-changes there will only modify the actual branch job configuration, not the folder for the github-repo. Also there is no global configuration available to set the default-folder-icon and there is no option available in the organisation folder settings to configure the foder-icon of the children. So I am a bit at a loss how to change this icon.
Would it be possible to inherit the configured folder-icon setting from the organisation folder? Or is there some other mechanism that I am missing with which I can customise this?
I also looked into the source code of the github-branch-source plugin, but can not find a spot where I might be able to add some code to change the default folder-icon. If I knew where to start I could maybe prepare a PR for this feature.
Your help is much appreciated!
- relates to
-
JENKINS-33900 save/apply button is missing when editing mutibranch jobs created inside a github organization folder
- Resolved
-
JENKINS-69920 Add global setting to change the default folder icon
- Open