Promoted builds are often special and in a job with an automatic discard policy there should be a promotion action choice to keep the build forever.

          [JENKINS-8689] Promotion action: Keep this build forever

          Brian Harris added a comment -

          Perhaps with this feature, 6166 would be unnecessary.

          Brian Harris added a comment - Perhaps with this feature, 6166 would be unnecessary.

          bap added a comment -

          Interresting.

          I have an implementation of this from December (in http://github.com/bap2000/plugin-promoted-builds.git), but it has not yet been merged.

          It adds a new action to the list available in promotions which will "Keep Build Forever".
          If you create a promotion with the "Keep Build Forever" action, then it will get the lock whenever the build achieves that level and therefore not get cleaned by the housekeeper.

          bap added a comment - Interresting. I have an implementation of this from December (in http://github.com/bap2000/plugin-promoted-builds.git ), but it has not yet been merged. It adds a new action to the list available in promotions which will "Keep Build Forever". If you create a promotion with the "Keep Build Forever" action, then it will get the lock whenever the build achieves that level and therefore not get cleaned by the housekeeper.

          bap added a comment -

          ... actually just looked at the code for it and it appears I'm doing something silly!
          It does a check to see if the original build is good enough for keeping, as well as the current promotion process.
          Who am I to decide whether the original build is good enough?

          Let me re-fork from the current plugin, remove that check, and stick it on a feature branch. (this Sun or Mon)
          I'll commit the new branch and see if someone wants to merge it

          bap added a comment - ... actually just looked at the code for it and it appears I'm doing something silly! It does a check to see if the original build is good enough for keeping, as well as the current promotion process. Who am I to decide whether the original build is good enough? Let me re-fork from the current plugin, remove that check, and stick it on a feature branch. (this Sun or Mon) I'll commit the new branch and see if someone wants to merge it

          bap added a comment -

          Implemented on feature branch keep_build_forever in repository https://github.com/jenkinsci/promoted-builds-plugin

          Just requires someone to check the code and merge to master

          bap added a comment - Implemented on feature branch keep_build_forever in repository https://github.com/jenkinsci/promoted-builds-plugin Just requires someone to check the code and merge to master

          this is a duplicate of JENKINS-6166

          Michael Hüttermann added a comment - this is a duplicate of JENKINS-6166

          Peter Hayes added a comment -

          Included in 2.0

          Peter Hayes added a comment - Included in 2.0

            Unassigned Unassigned
            brian_harris Brian Harris
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: