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

Log Discarder to delete log files generated by Jenkins pipeline scripts, but keep build information

    Details

    • Similar Issues:

      Description

      I've created a log discarder that acts similar to Jenkins' Log Rotation strategy to discard old builds.  However, this log discarder will delete the logs for older builds, but does not delete build information such as when a build was started and how long it took for trend analysis.

       

      I'm willing to submit a pull request!

       

      This change will also mitigate the issue: https://issues.jenkins-ci.org/browse/JENKINS-48344

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I do not plan to work on it anytime soon, see https://groups.google.com/d/msg/jenkinsci-dev/uc6NsMoCFQI/AIO4WG1UCwAJ for the context. Everybody is welcome to work on it

            Show
            oleg_nenashev Oleg Nenashev added a comment - I do not plan to work on it anytime soon, see https://groups.google.com/d/msg/jenkinsci-dev/uc6NsMoCFQI/AIO4WG1UCwAJ for the context. Everybody is welcome to work on it
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Original pull request from Thy Dai: https://github.com/jenkinsci/jenkins/pull/3545 

            In https://github.com/jenkinsci/jenkins/pull/3557 I have added Core API, which will allow implementing the Log rotator in a plugin. Once it is in the core, the custom Log rotator could be implemented in https://github.com/jenkinsci/buildrotator-plugin/commits/master or elsewhere (CC Alexander A). But TBH I do not fully agree with Jesse Glick's comment in the original https://github.com/jenkinsci/jenkins/pull/3545 , IMO this functionality could be an advanced option in the core if done in a compatible way

             

            Show
            oleg_nenashev Oleg Nenashev added a comment - Original pull request from Thy Dai : https://github.com/jenkinsci/jenkins/pull/3545   In https://github.com/jenkinsci/jenkins/pull/3557  I have added Core API, which will allow implementing the Log rotator in a plugin. Once it is in the core, the custom Log rotator could be implemented in https://github.com/jenkinsci/buildrotator-plugin/commits/master  or elsewhere (CC Alexander A ). But TBH I do not fully agree with Jesse Glick 's comment in the original https://github.com/jenkinsci/jenkins/pull/3545  , IMO this functionality could be an advanced option in the core if done in a compatible way  
            Hide
            adamvoss Adam Voss added a comment -

            "Original Poster", I think I might be showing my aged Internet usage... should have used `@` mentions and said Thy Dai's pull request.

            Show
            adamvoss Adam Voss added a comment - "Original Poster", I think I might be showing my aged Internet usage... should have used `@` mentions and said Thy Dai 's pull request.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Not sure what "OP" means in this case, but we consider all pull requests to the core. Obviously, we expect the changes to be done in a compatible way.

            Show
            oleg_nenashev Oleg Nenashev added a comment - Not sure what "OP" means in this case, but we consider all pull requests to the core. Obviously, we expect the changes to be done in a compatible way.
            Hide
            adamvoss Adam Voss added a comment -

            The existing, mainstream implementation already includes a distinction between keeping artifacts and keeping the build. Adding another distinction to it about keeping logs seems consistent with the existing role/scope and would provide a generally useful option; especially in the context of JENKINS-48344 or other cases where Jenkins users encounter disk space issues because of log size.

            From that standpoint I'd rather see it in the main implementation than a separate plugin. Would the OP's pull request be considered?

            Show
            adamvoss Adam Voss added a comment - The existing, mainstream implementation already includes a distinction between keeping artifacts and keeping the build. Adding another distinction to it about keeping logs seems consistent with the existing role/scope and would provide a generally useful option; especially in the context of JENKINS-48344 or other cases where Jenkins users encounter disk space issues because of log size. From that standpoint I'd rather see it in the main implementation than a separate plugin. Would the OP's pull request be considered?
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            BuildDiscatder is an extension point, so it can be implemented in a plugin.
            Also https://github.com/jenkinsci/buildrotator-plugin which may address this use-case

            Show
            oleg_nenashev Oleg Nenashev added a comment - BuildDiscatder is an extension point, so it can be implemented in a plugin. Also https://github.com/jenkinsci/buildrotator-plugin which may address this use-case

              People

              • Assignee:
                Unassigned
                Reporter:
                thyrex Thy Dai
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: