Custom Folder Icon

icon badge badge

custom folder icon custom folder icon plugin custom folder icon plugin

Introduction

This plugin extends the Folders Plugin to provide custom icons for folders. You can upload your own images, use predefined icons or use the combined build status of the jobs within a folder as icon.

Changelog

Release notes are recorded in GitHub Releases.

Version 2.x

This version requires Jenkins 2.357 and above in order to support the transition to Java 11.

  • Version 2.11 moved the Global Configuration to the Appearance configuration

  • Version 2.10 enables users to select the jobs to be considered for the combined build status in BuildStatusFolderIcon.

Changes in previous versions …​
  • Version 2.9 introduces a new type of icon. The FontAwesomeFolderIcon provides Font Awesome icons.

  • Version 2.6 enables users to select and re-use an already existing CustomFolderIcon. Further an icon file will now be deleted automatically if the folder it used is being deleted - unless of course the file is still used by another folder.

  • Version 2.5 introduces a new type of icon. The EmojiFolderIcon provides unicode emojis as icon.

  • Version 2.3 introduces a new type of icon. The IoniconFolderIcon provides icons from ionicons-api-plugin.

  • Version 2.0 introduces a new type of icon. The BuildStatusFolderIcon displays the combined build status of the jobs within a folder.

  • Since 1.83 of the job-dsl-plugin the Custom Folder Icons Plugin can be used in Job DSL configurations.

Version 1.x

Legacy version for Jenkins versions before 2.357.

  • Since 2.1044 of the branch-api-plugin the Custom Folder Icons Plugin can be used for Multi-Branch or Organization Projects.

Configuration

Folder Configuration

There are multiple types of custom icons provided by this plugin.

overview

Custom Folder Icon

Use your custom icon for a folder.

custom folder icon

Select the Custom Folder Icon option and use Browse…​ to choose a file.

You can crop the image to the desired result and upload it using the Apply button.

The file name will be randomized during upload.

You can also select an image from the list of the already available icons.

The file will be deleted automatically if the folder it used is being deleted - unless of course the file is still used by another folder.

custom folder icon configuration

Job DSL

Configuration via job-dsl-plugin:

userContent('customFolderIcons/custom.png', streamFileFromWorkspace('custom.png'))

folder('custom-icon') {
    icon {
        customFolderIcon {
            foldericon('custom.png')
        }
    }
}

Build Status Folder Icon

See the combined build status of the jobs within a folder.

build status folder icon

Select the Build Status Folder Icon option to use the combined build status of the jobs within a folder as icon.

You can select which jobs should be considered when the combined build status is determined.

When no jobs are selected every job within the folder is considered for the combined build status.

build status folder icon configuration

Job DSL

Configuration via job-dsl-plugin:

folder('build-status') {
    icon {
        buildStatusFolderIcon {
            jobs(['main', 'dev'] as Set)
        }
    }
}

Emoji Folder Icon

Use unicode emojis as icon.

emoji folder icon

Select the Emoji Folder Icon option and select any of the available emojis.

emoji folder icon configuration

Job DSL

Configuration via job-dsl-plugin:

folder('emoji-icon') {
    icon {
        emojiFolderIcon {
            emoji('sloth')
        }
    }
}

FontAwesome Folder Icon

Use Font Awesome Icons provided by font-awesome-api-plugin as icon.

fontawesome folder icon

Select the FontAwesome Folder Icon option and select any of the available icons.

fontawesome folder icon configuration

Job DSL

Configuration via job-dsl-plugin:

folder('fontawesome-icon') {
    icon {
        fontAwesomeFolderIcon {
            fontAwesome('brands/jenkins')
        }
    }
}

Ionicon Folder Icon

Use Ionicons provided by ionicons-api-plugin as icon.

ionicon folder icon

Select the Ionicon Folder Icon option and select any of the available icons.

ionicon folder icon configuration

Job DSL

Configuration via job-dsl-plugin:

folder('ionicon-icon') {
    icon {
        ioniconFolderIcon {
            ionicon('jenkins')
        }
    }
}

Global Configuration

Check for unused custom folder icon files and delete them. This operation will delete all images that are currently not used by any folder configuration.

global configuration