I would like the discard old build feature to have an option to always retain the last N builds, regardless of their age. It looks like "Max # of builds to keep" will keep the last N builds, but this is NOT what is does: the "Max 1 of builds to keep" does exactly what it says: once the max number of builds us reached, the oldest builds are deleted, so as to not exceed the max. But the "Max # of builds to keep" is overwritten by the "Days to keep builds". So if you need to keep the last N builds regardless of their age, it is not possible.

          [JENKINS-48715] Retain last N builds

          Nisarg Shah added a comment -

          deepchip What do you mean by retain last N builds. Does it mean getting last N builds which were discarded or something else.

          Or you want that both age and number of builds both factor plays a role in discarding build and no overwritten happens.(Similar to my GSoC Proposal)

          Can you please clarify?

          Nisarg Shah added a comment - deepchip What do you mean by retain last N builds. Does it mean getting last N builds which were discarded or something else. Or you want that both age and number of builds both factor plays a role in discarding build and no overwritten happens.(Similar to my GSoC Proposal) Can you please clarify?

            nkns165 nkns165
            deepchip Martin d'Anjou
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: