Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21322

Cleanup workspace when last build is >X days ago

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      We have a Jenkins install with lots of different jobs, most of them are triggered by SCM changes. In addition to be able to prune old builds, it would be desirable to be able to clean up the workspace if the last build was more than a specified number of days ago.

          [JENKINS-21322] Cleanup workspace when last build is >X days ago

          Lieuwe Hummel added a comment -

          Thanks, did not known about that yet, I'll give it a try

          Lieuwe Hummel added a comment - Thanks, did not known about that yet, I'll give it a try

          Moving this to core (as that is where hudson.model.WorkspaceCleanupThread currently resides). Though, the reoccurrence period nor the maximal workspace age can not be configured as requested.

          Oliver Gondža added a comment - Moving this to core (as that is where hudson.model.WorkspaceCleanupThread currently resides). Though, the reoccurrence period nor the maximal workspace age can not be configured as requested.

          Oliver Gondža added a comment - https://github.com/jenkinsci/jenkins/pull/1638

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/main/java/hudson/model/WorkspaceCleanupThread.java
          test/src/test/java/hudson/model/WorkspaceCleanupThreadTest.java
          http://jenkins-ci.org/commit/jenkins/825b04103c6ba2777a672d3811a5c0103540fd49
          Log:
          [FIXED JENKINS-21322] Make maximal workspace age configurable

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/main/java/hudson/model/WorkspaceCleanupThread.java test/src/test/java/hudson/model/WorkspaceCleanupThreadTest.java http://jenkins-ci.org/commit/jenkins/825b04103c6ba2777a672d3811a5c0103540fd49 Log: [FIXED JENKINS-21322] Make maximal workspace age configurable

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          core/src/main/java/hudson/model/WorkspaceCleanupThread.java
          test/src/test/java/hudson/model/WorkspaceCleanupThreadTest.java
          http://jenkins-ci.org/commit/jenkins/a803dc1f852fdf5d8add03b8fdca624c6a7ab9ee
          Log:
          Merge pull request #1638 from olivergondza/configure-periodic-ws-cleanup

          [FIXED JENKINS-21322] Configure periodic ws cleanup

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: core/src/main/java/hudson/model/WorkspaceCleanupThread.java test/src/test/java/hudson/model/WorkspaceCleanupThreadTest.java http://jenkins-ci.org/commit/jenkins/a803dc1f852fdf5d8add03b8fdca624c6a7ab9ee Log: Merge pull request #1638 from olivergondza/configure-periodic-ws-cleanup [FIXED JENKINS-21322] Configure periodic ws cleanup

          dogfood added a comment -

          Integrated in jenkins_main_trunk #4065

          Result = SUCCESS

          dogfood added a comment - Integrated in jenkins_main_trunk #4065 Result = SUCCESS

          Code changed in jenkins
          User: Daniel Beck
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/fec557818c79f8465d3ce73224d51d7f9598f2c2
          Log:
          Improve changelog entry for JENKINS-21322

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: changelog.html http://jenkins-ci.org/commit/jenkins/fec557818c79f8465d3ce73224d51d7f9598f2c2 Log: Improve changelog entry for JENKINS-21322

          arthur m added a comment -

          Hi,

          This ticket seems to implement exactly what I need, however I can't find how to turn it on in the Jenkins config. Is there anyone that could kindly point me to the proper page?

          Thanks,

          Arthur

          arthur m added a comment - Hi, This ticket seems to implement exactly what I need, however I can't find how to turn it on in the Jenkins config. Is there anyone that could kindly point me to the proper page? Thanks, Arthur

          arthurplma, see hudson.model.WorkspaceCleanupThread.recurrencePeriodHours and hudson.model.WorkspaceCleanupThread.retainForDays at https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties

          Oliver Gondža added a comment - arthurplma , see hudson.model.WorkspaceCleanupThread.recurrencePeriodHours and hudson.model.WorkspaceCleanupThread.retainForDays at https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties

          arthur m added a comment -

          Thanks Oliver

           

          arthur m added a comment - Thanks Oliver  

            olivergondza Oliver Gondža
            lurkie Lieuwe Hummel
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: