Skip to end of metadata
Go to start of metadata

Plugin Information

View diskcheck on the plugin site for more information.

This plugin checks for Disk Space on the slave machine before starting a build.

If the disk space is below minimum threshold (default 1 Gb ) build will fail,

One can set the threshold parameter in the Global Configuration , Also you can choose to delete the workspace if the disk space is low


-------------
Per-Job Configuration:   Once installed the Plugin is enabled by default in every job , you can disable it if you like 

Job Configuration Example:           

Global Configuration :

Enable Disk Recycler ::      if it's checked  and the disk space is low for a job , then it will delete everything in the current job workspace directory,

Threshold for disk check ::  you specify per job disk space requirement (in Gb ) in this text box  

Global Configuration Example :

 

Change Log

Version 0.29 (released Jun 14, 2017)

  • Changes to address issues with workspace cleanup when recycle is enabled (Pull#5)
  • Add Capability to check Disk space every time a Jenkins job starts ( previously it was using diskusage descriptor which runs once every hour)
  • Ensure that the system does not exit incase of error.

10 Comments

  1. Our jobs are failing because of the NPE, but I have seen it has been fixed in 0.27. When will this new version be released?

  2. Same issue with my builds. Rolling back to previous version resolved the issues. Seems this was an issue before also. We updated to version 0.29 and it broke our builds rolling back to version 0.26 fixed it. 

  3. I also just updated from 0.26 to 0.29 and have builds that fail because of an exception.

    Checking disk space Now 
    FATAL: 62
    java.lang.ArrayIndexOutOfBoundsException: 62
            at org.jenkinsci.plugin.Diskcheck.preCheckout(Diskcheck.java:122)
            at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76)
            at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:484)
            at hudson.model.Run.execute(Run.java:1735)
            at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
            at hudson.model.ResourceController.execute(ResourceController.java:97)
            at hudson.model.Executor.run(Executor.java:415)
    1. Thomas : Can you please share more details about your environment , what version of jenkins ? Also your slaves are windows/linux ?

      I think i understand where the error is coming from , I will add a fix and release the new version in another 24 hours.

       

       

      1. Windows Server 2008 R2

        Jenkins 2.66

  4. I had the same problem as @Thomas Spencer with 0.29 and had to roll back to 0.26. I have just tried 0.30 and I'm now getting this:

    Checking disk space Now 
    diskspace is null
    Total Disk space in workspace is 269.149
    FATAL: For input string: "269.149"
    java.lang.NumberFormatException: For input string: "269.149"
    	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    	at java.lang.Long.parseLong(Long.java:589)
    	at java.lang.Long.parseLong(Long.java:631)
    	at org.jenkinsci.plugin.Diskcheck.preCheckout(Diskcheck.java:147)
    	at jenkins.scm.SCMCheckoutStrategy.preCheckout(SCMCheckoutStrategy.java:76)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:484)
    	at hudson.model.Run.execute(Run.java:1735)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:415)

    I'm using Jenkins 2.65 on Windows 2008 SR2 with job running on the same host.

  5. @Slavomir,

     

    Thanks for reporting the issue, i think i understand what's happening there. I will address it with a newer version of the code in another 2-3 days.

  6. Hi,
    I'm using version 0.30 of the plugin with Jenkins 2.60.1 on Ubuntu 16.04.1. I've enabled the option check disk space and set threshold to 1GB. However when I run the build it's giving "no space left on device Build step 'Docker Build and Publish' marked build as failure"

  7. I have same issue

    DiskCheck 0.30

    Jenkins ver. 2.73.1

     

    09:19:04 Disk space threshold is set to :25Gb
    09:19:04 Checking disk space Now 
    09:19:04 diskspace is null
    09:19:04 Total Disk space in workspace is 82.431
    09:19:04 FATAL: For input string: "82.431"
    09:19:04 java.lang.NumberFormatException: For input string: "82.431"