diff --git a/CHANGELOG-old.md b/CHANGELOG-old.md new file mode 100644 index 0000000..72c0303 --- /dev/null +++ b/CHANGELOG-old.md @@ -0,0 +1,43 @@ +# Changelog + +The CHANGELOG is now maintained on the GitHub releases page: + + +## 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 diff --git a/README.md b/README.md index ede7dad..a11d523 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/pom.xml b/pom.xml index 578cc9c..da022c1 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ org.jenkins-ci.plugins plugin - 3.50 + 4.3 cloudbees-disk-usage-simple @@ -39,12 +39,11 @@ CloudBees Disk Usage Simple Plugin This is a simple disk usage plugin that calculates job disk usage while limiting the performance impact on the Jenkins master. - https://wiki.jenkins.io/display/JENKINS/CloudBees+Simple+Disk+Usage+Plugin + https://github.com/jenkinsci/cloudbees-disk-usage-simple-plugin - 2.60.3 + 2.176.4 8 - false diff --git a/src/main/java/com/cloudbees/simplediskusage/JobDiskItem.java b/src/main/java/com/cloudbees/simplediskusage/JobDiskItem.java index 31b4ecf..2734481 100644 --- a/src/main/java/com/cloudbees/simplediskusage/JobDiskItem.java +++ b/src/main/java/com/cloudbees/simplediskusage/JobDiskItem.java @@ -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(); + } } diff --git a/src/main/java/com/cloudbees/simplediskusage/QuickDiskUsageManagementLink.java b/src/main/java/com/cloudbees/simplediskusage/QuickDiskUsageManagementLink.java index 41780f8..12495f7 100644 --- a/src/main/java/com/cloudbees/simplediskusage/QuickDiskUsageManagementLink.java +++ b/src/main/java/com/cloudbees/simplediskusage/QuickDiskUsageManagementLink.java @@ -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 >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. */ diff --git a/src/main/resources/com/cloudbees/simplediskusage/QuickDiskUsagePlugin/index.jelly b/src/main/resources/com/cloudbees/simplediskusage/QuickDiskUsagePlugin/index.jelly index c5e9ac2..5eb637d 100644 --- a/src/main/resources/com/cloudbees/simplediskusage/QuickDiskUsagePlugin/index.jelly +++ b/src/main/resources/com/cloudbees/simplediskusage/QuickDiskUsagePlugin/index.jelly @@ -64,7 +64,7 @@ -
+

Background

Large amounts of disk are typically consumed by a job's build history as each entry in the build history will have an archived