• Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major Major
    • other
    • None
    • Platform: All, OS: All

      It´s prerequisite for issue 4197 to be effective.

      • Can be implemented only in some plugin for 4197 (store copied jUnit results
        separeted for complete history of job)
      • But there is other way, that can be usefull in more ways.

      When you discard old builds, function form 4197 is uselles. You need the jUnit
      reports history. But on the other side, you need the discard old builds with
      parameters (max X days, max Y number of builds) because of disc space.

      My idea is some sort of "list of checkboxes" that selects what to discard/keep.

      Possible use case:
      Set treshold to 25 builds, discard old JAR/WAR (200MB each build), keep jUnit +
      cobertura results (very low disk consumption)

      But it is more complicated way because many other Plugins must be upgraded to
      add themselves to this list.

          [JENKINS-4198] partial cleanup of historical build artifacts

          mdonohue added a comment -

          Dup

              • This issue has been marked as a duplicate of 834 ***

          mdonohue added a comment - Dup This issue has been marked as a duplicate of 834 ***

          hanys added a comment -

          mdonohue: sorry for reopen, yes, I was not aware of 834, thank you, but I still
          think this is another issue. If you mark this again as RESOLVED DUPLICATE again,
          it stays that, I promise.

          I studied 834 and every another "marked as dupliacate" issues from 834. I still
          see differences between my aproach and everything else, also because I don´t now
          how exactly this feature is planned to be implemented.

          One is "discard everything except specified artefacts" aproach, so after run
          "Discard old build" feature there is still "something" left behind for
          Hudson/Plugins. Disk usage logs, test results, what-ever...

          Some plugins are helpfull for this even now - Plugins, section Artifact
          uploaders, CopyArchiver Plugin and so.

          My aproach is reversed - "discard only specified". JAR/WAR, etc. Everything else
          stayes. Even - and that is for me critical - the build itself stays. It is NOT
          deleted. It is because for my job is number one my issue 4197 (maybe another
          duplicate), I need full history of old builds for longer time and I also need
          permalinked URL to this old build, with test results, change results etc. And
          disk space is of corse limit for this when every build produce hundreds of
          megabytes of JARs.

          So it is in fact not update of "delete old builds" feature, but new "purge old
          build" feature. I changed also the description.

          And of course, it can be super to combine this two features in administration -
          use case for example:
          discard old builds (after 365 days) and purge old builds (after 10 builds).

          hanys added a comment - mdonohue: sorry for reopen, yes, I was not aware of 834, thank you, but I still think this is another issue. If you mark this again as RESOLVED DUPLICATE again, it stays that, I promise. I studied 834 and every another "marked as dupliacate" issues from 834. I still see differences between my aproach and everything else, also because I don´t now how exactly this feature is planned to be implemented. One is "discard everything except specified artefacts" aproach, so after run "Discard old build" feature there is still "something" left behind for Hudson/Plugins. Disk usage logs, test results, what-ever... Some plugins are helpfull for this even now - Plugins, section Artifact uploaders, CopyArchiver Plugin and so. My aproach is reversed - "discard only specified". JAR/WAR, etc. Everything else stayes. Even - and that is for me critical - the build itself stays. It is NOT deleted. It is because for my job is number one my issue 4197 (maybe another duplicate), I need full history of old builds for longer time and I also need permalinked URL to this old build, with test results, change results etc. And disk space is of corse limit for this when every build produce hundreds of megabytes of JARs. So it is in fact not update of "delete old builds" feature, but new "purge old build" feature. I changed also the description. And of course, it can be super to combine this two features in administration - use case for example: discard old builds (after 365 days) and purge old builds (after 10 builds).

          mdonohue added a comment -

          I think your goal is to have a feature that only cleans up some artifacts, but leaves others. Whether that is done as inclusion or exclusion can be left up to the implementor. This can get arbitrarily complex, and one of the Hudson goals is to have simple UI, so a tradeoff will have to be balanced here.

          mdonohue added a comment - I think your goal is to have a feature that only cleans up some artifacts, but leaves others. Whether that is done as inclusion or exclusion can be left up to the implementor. This can get arbitrarily complex, and one of the Hudson goals is to have simple UI, so a tradeoff will have to be balanced here.

          hanys added a comment -

          mdonohue:
          Yes, you sumarized this perfectly (and new summary is clearer, I agree).

          In administration specify what need to be destroyed, not what to keep = you dont have to remember your setting for future when you add some more plugins with their own artificats - which will be automaticly cleaned and you suspect that new plugin and its settings and not your setting from last year

          So it can be both exclusion and inclousion, but this way:

          • inclusion = clean this
          • exclusion = keep everything except this

          Thinking in way "what to keep" is already through plugins like SCP upload plugin and so.

          hanys added a comment - mdonohue: Yes, you sumarized this perfectly (and new summary is clearer, I agree). In administration specify what need to be destroyed, not what to keep = you dont have to remember your setting for future when you add some more plugins with their own artificats - which will be automaticly cleaned and you suspect that new plugin and its settings and not your setting from last year So it can be both exclusion and inclousion, but this way: inclusion = clean this exclusion = keep everything except this Thinking in way "what to keep" is already through plugins like SCP upload plugin and so.

          hanys added a comment -

          now I see that what I posted about inclusion and exlusion is the same thing, but I have no rights for editing comments..

          hanys added a comment - now I see that what I posted about inclusion and exlusion is the same thing, but I have no rights for editing comments..

          Flominator added a comment - - edited

          As posted earlier in http://issues.jenkins-ci.org/browse/JENKINS-834 we wrote some windows batch script that deletes all artifacts except the last n ones and the ones that are tagged. Maybe some of you might want to use it as a workaround:

          @ECHO OFF
          SET NUMTOKEEP=15
          SET JOBSPACE=C:\Dokumente und Einstellungen\Administrator\.hudson\jobs\the_product\builds

          ECHO delete all build artifacts except the last %NUMTOKEEP% and tagged ones

          C:
          cd "%JOBSPACE%"
          for /F "delims=! skip=%NUMTOKEEP%" %%f in ('dir "%JOBSPACE%" /b /o:-N /a:d') DO ( REM currently using %%f
          FINDSTR /C:"/tags/" "%JOBSPACE%%%f\build.xml" > nul
          IF ERRORLEVEL 1 (REM echo build was not not tagged, since text "tags" was not found
          rem echo delete "%JOBSPACE%%%f\archive"
          rd /q /s "%JOBSPACE%%%f\archive" 2>nul
          )
          )
          ECHO.
          exit 0

          Flominator added a comment - - edited As posted earlier in http://issues.jenkins-ci.org/browse/JENKINS-834 we wrote some windows batch script that deletes all artifacts except the last n ones and the ones that are tagged. Maybe some of you might want to use it as a workaround: @ECHO OFF SET NUMTOKEEP=15 SET JOBSPACE=C:\Dokumente und Einstellungen\Administrator\.hudson\jobs\the_product\builds ECHO delete all build artifacts except the last %NUMTOKEEP% and tagged ones C: cd "%JOBSPACE%" for /F "delims=! skip=%NUMTOKEEP%" %%f in ('dir "%JOBSPACE%" /b /o:-N /a:d') DO ( REM currently using %%f FINDSTR /C:"/tags/" "%JOBSPACE%%%f\build.xml" > nul IF ERRORLEVEL 1 (REM echo build was not not tagged, since text "tags" was not found rem echo delete "%JOBSPACE%%%f\archive" rd /q /s "%JOBSPACE%%%f\archive" 2>nul ) ) ECHO. exit 0

          Alan Harder added a comment -

          Can this be closed now that JENKINS-834 has been implemented?

          Alan Harder added a comment - Can this be closed now that JENKINS-834 has been implemented?

          Alan Harder added a comment -

          will close soon without further input, thanks.

          Alan Harder added a comment - will close soon without further input, thanks.

          hanys added a comment -

          sorry, forgotten in the rush of diploma thesis & new job.

          Yes, this the feature that makes Hudson even greater
          As it was marked as a duplicate of #834, I stop caring about this issue and look only at "live parent".

          Thanks for noticing here (via comment and then via JIRA to email )

          hanys added a comment - sorry, forgotten in the rush of diploma thesis & new job. Yes, this the feature that makes Hudson even greater As it was marked as a duplicate of #834, I stop caring about this issue and look only at "live parent". Thanks for noticing here (via comment and then via JIRA to email )

          hanys added a comment -

          marked as closed.
          btw what about relevantJENKINS-4197?

          hanys added a comment - marked as closed. btw what about relevantJENKINS-4197?

            Unassigned Unassigned
            hanys hanys
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: