• Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.303.1
      Enhanced Old Build Discarder plugin 1.4

      When setting 

      buildDiscarder([$class: 'EnhancedOldBuildDiscarder', artifactDaysToKeepStr: '',
                                                           artifactNumToKeepStr: '',
                                                           daysToKeepStr: '7',
                                                           numToKeepStr: '',
                                                           discardOnlyOnSuccess: false,
                                                           holdMaxBuilds: false]),
      

      in properties, the build is not removed after 7 days if there is only one build remaining.
      The documentation for "Days to keep builds" states:

      if not empty, build records are only kept up to this number of days
      

      so I would assume that the build should be discarded even if it is the last remaining build.

          [JENKINS-66572] Last remaining build is not discarded

          Christoph Vogtländer created issue -
          Christoph Vogtländer made changes -
          Description Original: When setting 
          {code:java}
          buildDiscarder([$class: 'EnhancedOldBuildDiscarder', artifactDaysToKeepStr: '',
                                                               artifactNumToKeepStr: '',
                                                               daysToKeepStr: 7,
                                                               numToKeepStr: '',
                                                               discardOnlyOnSuccess: false,
                                                               holdMaxBuilds: false]),
          {code}
          in _properties_, the build is not removed after 7 days if there is only one build remaining.
           The documentation for "Days to keep builds" states:
          {noformat}
          if not empty, build records are only kept up to this number of days
          {noformat}
          so I would assume that the build should be discarded even if it is the last remaining build.
          New: When setting 
          {code:java}
          buildDiscarder([$class: 'EnhancedOldBuildDiscarder', artifactDaysToKeepStr: '',
                                                               artifactNumToKeepStr: '',
                                                               daysToKeepStr: '7',
                                                               numToKeepStr: '',
                                                               discardOnlyOnSuccess: false,
                                                               holdMaxBuilds: false]),
          {code}
          in _properties_, the build is not removed after 7 days if there is only one build remaining.
           The documentation for "Days to keep builds" states:
          {noformat}
          if not empty, build records are only kept up to this number of days
          {noformat}
          so I would assume that the build should be discarded even if it is the last remaining build.

            Unassigned Unassigned
            gordin Christoph Vogtländer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: