Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate docs + categorise management link + use supported lts version + dark theme fix #29

Merged
merged 6 commits into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions CHANGELOG-old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog

The CHANGELOG is now maintained on the GitHub releases page:
<https://github.com/jenkinsci/cloudbees-disk-usage-simple-plugin/releases>

## 0.9 (2017-08-03)
* Postpone disk usage update after Jenkins is fully up (JENKINS-45943)

## 0.8 (2017-06-06)
* Reduce scan impact on filesystem freeze (JENKINS-44646)

## 0.7 (2017-05-24)
* Rewrite the low level code to use Java 7 NIO directory walker. The plugin does not rely on du command anymore and works everywhere now. (JENKINS-44445)

## 0.6 (2017-05-24)
Not released, had permission issue during publication

## 0.5 (2015-10-05)
* du wasn't correctly launched using ionice
* Don't let du processes run for more than 20 seconds for a period of time. The periodic task will retry to compute directory size next time it gets scheduled. By that time, we assume that OS system cache will hold more inode entries to complete faster.
* Use the the system property com.cloudbees.simplediskusage.QuickDiskUsagePlugin.command to override the du command

## 0.4 (2015-09-25)
* Plugin is too verbose (JENKINS-30279)
* When a refresh of data is manually triggered, it is processed 2 times (JENKINS-30631)
* When a refresh of data is manually triggered, the screen displays nothing (JENKINS-30633)
* List JENKINS_HOME and its first level sub directories disk usages (JENKINS-30311)
* Computes data when Jenkins is up and stores them across restarts (JENKINS-30635)
* Improve messages about data status (JENKINS-30636)
* Allow auto-refresh on disk usage screens (JENKINS-30637)
* Increase the refresh period from 3 to 15 minutes (JENKINS-30638)
+ various UI and code improvements

## 0.3 (2015-08-06)
* Display disk usage of `java.io.tmpdir` (JENKINS-29516)
* The plugin identifier was renamed from cloudbees-disk-usage-simple to cloudbees-disk-usage-simple-plugin. You will have to uninstall the 0.1 version and install the 0.2 from the update center.
* Improve message displayed when statistics aren't yet available

## 0.2
Trashed (smile)

## 0.1
Initial release
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
This is a simple disk usage plugin that calculates disk usage while limiting the performance impact on the Jenkins master.
# CloudBees Disk Usage Simple Plugin

[![Build Status](https://ci.jenkins.io/job/Plugins/job/cloudbees-disk-usage-simple-plugin/job/master/badge/icon)](https://ci.jenkins.io/job/Plugins/job/cloudbees-disk-usage-simple-plugin/job/master/)
[![Contributors](https://img.shields.io/github/contributors/jenkinsci/cloudbees-disk-usage-simple-plugin.svg)](https://github.com/jenkinsci/cloudbees-disk-usage-simple-plugin/graphs/contributors)
[![Jenkins Plugin](https://img.shields.io/jenkins/plugin/v/cloudbees-disk-usage-simple.svg)](https://plugins.jenkins.io/cloudbees-disk-usage-simple)
[![GitHub release](https://img.shields.io/github/release/jenkinsci/cloudbees-disk-usage-simple-plugin.svg?label=changelog)](https://github.com/jenkinsci/cloudbees-disk-usage-simple-plugin/releases/latest)
[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/cloudbees-disk-usage-simple.svg?color=blue)](https://plugins.jenkins.io/cloudbees-disk-usage-simple)

Simple disk usage plugin that calculates disk usage while limiting the performance impact on the Jenkins master.

# Features
* uses Java 7 NIO directory walker API to calculate the size of jobs and 1st level directories under `$JENKINS_HOME`
* throttle the directory scan to help prevent the load average from climbing too high
* a refresh of usage data is automatically launched when you display the screen and they are older than 15 minutes
* a refresh of usage data can be also manually requested, but only one at a time will occur
* refreshes usage data when you load the disk usage page, and the data is older than 15 minutes
* a refresh of usage data can be manually requested, but only one at a time will occur

To use this plugin visit the `Manage Jenkins` -> `Disk usage` page.

# Resources
* Continuous Integration: [![Build Status](https://ci.jenkins.io/job/Plugins/job/cloudbees-disk-usage-simple-plugin/job/master/badge/icon)](https://ci.jenkins.io/job/Plugins/job/cloudbees-disk-usage-simple-plugin/job/master/)
* Issues Tracking: [Jira](https://issues.jenkins-ci.org/issues/?jql=project+%3D+JENKINS+AND+component+%3D+cloudbees-disk-usage-simple-plugin)
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.50</version>
<version>4.3</version>
</parent>

<artifactId>cloudbees-disk-usage-simple</artifactId>
Expand All @@ -39,12 +39,11 @@

<name>CloudBees Disk Usage Simple Plugin</name>
<description>This is a simple disk usage plugin that calculates job disk usage while limiting the performance impact on the Jenkins master.</description>
<url>https://wiki.jenkins.io/display/JENKINS/CloudBees+Simple+Disk+Usage+Plugin</url>
<url>https://github.com/jenkinsci/cloudbees-disk-usage-simple-plugin</url>

<properties>
<jenkins.version>2.60.3</jenkins.version>
<jenkins.version>2.176.4</jenkins.version>
<java.level>8</java.level>
<findbugs.failOnError>false</findbugs.failOnError>
</properties>

<licenses>
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/com/cloudbees/simplediskusage/JobDiskItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,14 @@ public String getFullName() {
public String getUrl() {
return url;
}

@Override
public boolean equals(Object o) {
return super.equals(o);
}

@Override
public int hashCode() {
return super.hashCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ public String getUrlName() {
return "disk-usage-simple";
}

/**
* Name of the category for this management link. Exists so that plugins with core dependency pre-dating the version
* when this was introduced can define a category.
*
* TODO when the core version is &gt;2.226 change this to override {@code getCategory()} instead
*
* @return name of the desired category, one of the enum values of Category, e.g. {@code STATUS}.
* @since 2.226 of Jenkins core
*/
public String getCategoryName() {
return "STATUS";
}

/**
* Only sysadmin can access this page.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</j:forEach>
</tbody>
</table>
<div style="padding:10px; margin-top: 10px; border: solid 1px #000; background: #cfc">
<div style="padding:10px; margin-top: 10px; border: solid 1px #000">
<h4>Background</h4>
<p>
Large amounts of disk are typically consumed by a job's build history as each entry in the build history will have an archived
Expand Down