CloudBees Inactive Items Plugin

2 minute read
The CloudBees Inactive Items plugin is a Preview feature.
Preview

A Preview feature:

  • Has not undergone end-to-end testing with CloudBees products

  • Is provided without service-level agreements (SLA) and therefore does not include CloudBees' commitment on functionality or performance

  • May impact other stable areas of the product when used

  • May have limited documentation

  • May not be feature complete during the Preview period

  • May graduate from preview state to fully supported or be removed from the product

  • May introduce incompatible, backward-breaking changes that could revoke the ability to upgrade

Product features and documentation are frequently updated. If you find an issue or have a suggestion, please contact CloudBees Support.

The CloudBees Inactive Items plugin analyzes the jobs, folders, multibranch pipelines, and organization folders within your controller and produces a report that lists the inactive items.

Configuring the Inactive Items plugin

The Inactive Items plugin is enabled per controller. A job is considered inactive if the last build occurred over the configured time limit. A folder is considered inactive if it only contains inactive items.

When you enable the plugin, you can configure the frequency at which the analysis will run in the background and the length of time a job is considered inactive.

To configure the Inactive Items plugin:

  1. From the main Dashboard, select a controller.

  2. On the left menu, select Manage Jenkins.

  3. On the Manage Jenkins page, select Configure System.

  4. On the Configure System page, navigate to Inactive Items Analysis setting.

    Inactive Items Analysis
    Figure 1. Inactive Items Analysis
  5. Select Enable item inactivity analysis and reporting. This setting enables the inactive items analysis for your controller.

    Clear this checkbox to disable the plugin so that it does not run the analysis.
  6. Enter the following values:

    1. Analysis Frequency - Enter how often the analysis should run. The default is 30 days.

    2. Days before Inactivity - Enter the number of days without activity makes a job inactive. The default is 20 days.

      It is recommended that you set the Analysis Frequency to match the frequency of the cleanup of your CloudBees CI instance.
  7. Select Save.

Once the plugin is configured, the analysis runs based on the frequency set. The results are displayed on the Inactive Items Report Summary page.

Inactive Items Report Summary page

The Inactive Items Report Summary page lists the first 100 inactive items within a controller, the job type, and the last date the job was active.

To view the Inactive Items Report Summary page:

  1. Select a controller from the main dashboard.

  2. On the left menu, select Manage Jenkins.

  3. On the Manage Jenkins page, navigate to Tools and Actions and select Inactive Items Report.

    Inactive Items Report Summary page
    Figure 2. Inactive Items Report Summary page

From the Inactive Items Report Summary page, you can also:

  • Select Trigger Analysis to run the inactive items analysis on-demand.

  • Select Download Report to download the full inactive items report and access every inactive job and folder within a controller.

Downloading Inactive Items reports

You can also download the full Inactive Items Report by using the HTTP API and the Jenkins CLI.

HTTP API

Run the following command to retrieve the inactive items report.

curl --user <admin-user>:<token> <your-controller-url>/inactive-items/api/report

Jenkins CLI

Run the following command to retrieve the inactive items report.

java -jar jenkins-cli.jar -s <your-controller-url> -auth <admin-user>:<token> download-inactive-items-report