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

Limiting the artifacts in a multi-configuration project doesn'nt work

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • matrix-project-plugin
    • None
    • OS: Ubuntu 9-10

      When using multi-configuration projects, limiting the number of stored artifacts doesn't work. All artifacts are still stored.

          [JENKINS-6925] Limiting the artifacts in a multi-configuration project doesn'nt work

          cjo9900 added a comment -

          I propose that the the artifacts are limited in an individual configuration by configuration case.

          So that if the "archive days to keep" is set, this follows normal rules and keeps artifacts for that period.

          For "archive number to keep" this would be applied to each configuration so that the last X sets of artifacts are kept for each configuration. This would mean that disabled configurations would maintain that amount of artifacts (assuming they are not removed by other rules).

          This is slightly different to what occurs with the builds which removes the individual configuration builds only if the parent does not have a matching buildnumber.

          I propose to extend the LinkedLogRotator to accept "archive days to keep" and "archive number to keep" values, and on the perform call the super class to handle these. while the builds are handled as current code.

          cjo9900 added a comment - I propose that the the artifacts are limited in an individual configuration by configuration case. So that if the "archive days to keep" is set, this follows normal rules and keeps artifacts for that period. For "archive number to keep" this would be applied to each configuration so that the last X sets of artifacts are kept for each configuration. This would mean that disabled configurations would maintain that amount of artifacts (assuming they are not removed by other rules). This is slightly different to what occurs with the builds which removes the individual configuration builds only if the parent does not have a matching buildnumber. I propose to extend the LinkedLogRotator to accept "archive days to keep" and "archive number to keep" values, and on the perform call the super class to handle these. while the builds are handled as current code.

          cjo9900 added a comment -

          Diff of proposed changes

          cjo9900 added a comment - Diff of proposed changes

          cjo9900 added a comment -

          Correct version proposed for commit

          cjo9900 added a comment - Correct version proposed for commit

          Alan Harder added a comment -

          looks good.. I just added a null check and left out the logging.

          Alan Harder added a comment - looks good.. I just added a null check and left out the logging.

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/matrix/LinkedLogRotator.java
          trunk/hudson/main/core/src/main/java/hudson/matrix/MatrixConfiguration.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/33178
          Log:
          [FIXED JENKINS-6925] Support LogRotator deletion of old artifacts in
          multiconfiguration(matrix) projects, based on patch from cjo9900.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/matrix/LinkedLogRotator.java trunk/hudson/main/core/src/main/java/hudson/matrix/MatrixConfiguration.java trunk/www/changelog.html http://jenkins-ci.org/commit/33178 Log: [FIXED JENKINS-6925] Support LogRotator deletion of old artifacts in multiconfiguration(matrix) projects, based on patch from cjo9900.

            cjo9900 cjo9900
            ddecock ddecock
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: