Archived results not being kept according tot he job configuration

35 views
Skip to first unread message

Eric Wood

unread,
Jan 20, 2015, 8:36:48 AM1/20/15
to Jenkinsci-users
I have a job which is configured to keep builds for 14 days and archives for 14 days as well.  I only have the last two build archived.  The place I have configured this is in "Discard Old Build". Not sure if I am missing some other configuration step. 
 

Ginga, Dick

unread,
Jan 20, 2015, 8:40:10 AM1/20/15
to jenkins...@googlegroups.com

I think that it only keeps that last 14 actual days. It deletes builds older than 14 days ago. I use both the days and the next field, Max builds to keep.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/757364130.2291139.1421761000676.JavaMail.yahoo%40jws100202.mail.ne1.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

Eric Wood

unread,
Jan 20, 2015, 9:24:15 AM1/20/15
to jenkins...@googlegroups.com
This job seems to be strange as I can see the values being changes in the config.xml, but regardless of what I set it to it seems to keep the last two builds.

Any idea on why the settings are not being honored?

E


Ginga, Dick

unread,
Jan 20, 2015, 9:25:18 AM1/20/15
to jenkins...@googlegroups.com

It only applies new values after the next build

Eric Wood

unread,
Jan 20, 2015, 10:36:51 AM1/20/15
to jenkins...@googlegroups.com
I created a copy of this job and the configuration under "Discard old builds" says

    Log rotation
        Max # of build to keep: 30
        <under advanced>
        Max # of builds to keep with artifacts: 15

The config.xml files says:

  <logRotator class="hudson.tasks.LogRotator">
    <daysToKeep>-1</daysToKeep>
    <numToKeep>30</numToKeep>
    <artifactDaysToKeep>-1</artifactDaysToKeep>
    <artifactNumToKeep>15</artifactNumToKeep>
  </logRotator>

which agrees with the configuration.  As soon as I run the third build for today, it removes the archived artifacts for the first build and is only saving archived artifacts for the last two.

I'm currently running Jenkins 1.554.3

Thanks, Eric




Ginga, Dick

unread,
Jan 20, 2015, 10:47:04 AM1/20/15
to jenkins...@googlegroups.com

Sorry, I can’t advise on why it is NOT doing what it should. Maybe some else can.

Eric Wood

unread,
Jan 20, 2015, 12:35:02 PM1/20/15
to jenkins...@googlegroups.com
I have resolved this.  Under the archive artifacts section is an advanced checkbox that says only keep the latest in order to save disk space that obviously overrides the discard settings.




Daniel Beck

unread,
Jan 20, 2015, 12:37:50 PM1/20/15
to jenkins...@googlegroups.com
The option has ben migrated into the log rotator in newer Jenkins versions because it was so weird/redundant.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/270083886.2344827.1421775295929.JavaMail.yahoo%40jws10097.mail.ne1.yahoo.com.
Reply all
Reply to author
Forward
0 new messages