• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • core
    • None

      Setting the "Max # of builds to keep" for a job does not cause old builds to be discarded. I set this as Major as this will lead to the build system dying after running out of disk space.

      I have found a work around here: http://groups.google.com/group/jenkinsci-users/browse_thread/thread/5573bee99bc2c42d

      I created a job in my Jenkins instance to run the following groovy script (as a "system" groovy script - not sure if that matters...) - this forces the old builds to be discarded per what I have defined in the config:

      import hudson.model.*
      for(job in Hudson.instance.items) {
         job.logRotate()
      }
      

          [JENKINS-13039] Max # of builds to keep not deleting old builds

          allenservedio created issue -
          allenservedio made changes -
          Description Original: Setting the "Max # of builds to keep" for a job does not cause old builds to be discarded. I set this as Major as this will lead to the build system dying after running out of disk space.

          I have found a work around here: http://groups.google.com/group/jenkinsci-users/browse_thread/thread/5573bee99bc2c42d

          I created a job in my Jenkins instance to run the following groovy script (as a "system" groovy script - not sure if that matters...) - this forces the old builds to be discarded per what I have defined in the config:

          import hudson.model.*
          for(job in Hudson.instance.items) {
             job.logRotate()
          }
          New: Setting the "Max # of builds to keep" for a job does not cause old builds to be discarded. I set this as Major as this will lead to the build system dying after running out of disk space.

          I have found a work around here: http://groups.google.com/group/jenkinsci-users/browse_thread/thread/5573bee99bc2c42d

          I created a job in my Jenkins instance to run the following groovy script (as a "system" groovy script - not sure if that matters...) - this forces the old builds to be discarded per what I have defined in the config:

          {code}
          import hudson.model.*
          for(job in Hudson.instance.items) {
             job.logRotate()
          }
          {code}
          Daniel Beck made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 143499 ] New: JNJira + In-Review [ 190587 ]

            Unassigned Unassigned
            allenservedio allenservedio
            Votes:
            12 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: