Old Builds not getting discarded

1,455 views
Skip to first unread message

Anubhaw Shrivastav

unread,
Apr 27, 2012, 8:52:12 AM4/27/12
to jenkins...@googlegroups.com, venkat Gajulapalli, Supriya Gaikwad
Hi everyone,

We have some jobs running on Jenkins configured to "Discard Old Builds", and despite setting "Max # of builds to keep" to 10 (or any other number for that matter), Jenkins is keeping a fat bunch of previous builds in workspace.

Please provide any insights.

Thanks,
Anubhaw

Sami Tikka

unread,
Apr 28, 2012, 6:36:32 PM4/28/12
to jenkins...@googlegroups.com
Jenkins does not store the builds in the workspace.

When you configure Jenkins to archive build artifacts, they are copied away from the workspace. These artifacts, and build logs and test results are controlled by the Discard Old Builds setting.

If you have old builds in the workspace, you probably have not set up anything to clean the workspace from files from previous builds. You could check the box under SCM settings to clean the workspace before building. (This setting is in the SCM part of the job configuration because every SCM plugin has their own way of doing it.)

There is also a delete workspace plugin, which is useful for builds that do not use SCM.

-- Sami

Anubhaw Shrivastav

unread,
Apr 30, 2012, 2:53:19 AM4/30/12
to Jenkins Users
My apologies for not clearly defining the problem earlier.

The build artifacts that are getting archived (and that should be
controlled by the 'Discard Old Builds' setting) are not getting
deleted despite setting the limit to any particular number (say, 10).

No issues with the workspace as it gets cleaned up before each build
(as intended).
Please provide any pointers regarding this.

Thanks,
Anubhaw


On Apr 29, 3:36 am, Sami Tikka <sjti...@gmail.com> wrote:
> Jenkins does not store the builds in the workspace.
>
> When you configure Jenkins to archive build artifacts, they are copied away from the workspace. These artifacts, and build logs and test results are controlled by the Discard Old Builds setting.
>
> If you have old builds in the workspace, you probably have not set up anything to clean the workspace from files from previous builds. You could check the box under SCM settings to clean the workspace before building. (This setting is in the SCM part of the job configuration because every SCM plugin has their own way of doing it.)
>
> There is also a delete workspace plugin, which is useful for builds that do not use SCM.
>
> -- Sami
>

Jan Seidel

unread,
Apr 30, 2012, 7:56:57 AM4/30/12
to jenkins...@googlegroups.com
Saving any fingerprints and eventually preserving these or in other words: is another job accessing the artifacts with fingerprints and has set the option "keep forever" set?
This may be your problem.

Tkae care
Jan

Joshua J. Kugler

unread,
Apr 30, 2012, 9:25:42 PM4/30/12
to jenkins...@googlegroups.com, Anubhaw Shrivastav, venkat Gajulapalli, Supriya Gaikwad
On Friday, April 27, 2012, Anubhaw Shrivastav elucidated thus:
> Hi everyone,
>
> We have some jobs running on Jenkins configured to "Discard Old
> Builds", and despite setting "Max # of builds to keep" to 10 (or any
> other number for that matter), Jenkins is keeping a fat bunch of
> previous builds in workspace.

Anubhaw:

Please add your configuration details to this bug:
https://issues.jenkins-ci.org/browse/JENKINS-13554 as it seems there is
a growing number of users seeing this behavior.

We only started seeing it with recent versions of Jenkins.

j

--
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
jos...@azariah.com - Jabber: peda...@gmail.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A

Joshua J. Kugler

unread,
May 15, 2012, 8:54:46 PM5/15/12
to jenkins...@googlegroups.com, Anubhaw Shrivastav, venkat Gajulapalli, Supriya Gaikwad
On Monday, April 30, 2012, Joshua J. Kugler elucidated thus:
> On Friday, April 27, 2012, Anubhaw Shrivastav elucidated thus:
> > Hi everyone,
> >
> > We have some jobs running on Jenkins configured to "Discard Old
> > Builds", and despite setting "Max # of builds to keep" to 10 (or
> > any other number for that matter), Jenkins is keeping a fat bunch
> > of previous builds in workspace.
>
> Anubhaw:

Are you using the Promoted Builds plugin?
Reply all
Reply to author
Forward
0 new messages