Is there a Jenkins built-in way to delete old archived artifacts?

16,803 views
Skip to first unread message

John Vacz

unread,
Aug 5, 2011, 5:48:27 PM8/5/11
to Jenkins Users
My Jenkins master is running out of disk space, the reason is lots of
archived artifacts of an ever-living job which keeps all build histories
of last years.

I want to delete the old artifacts but keep all the build histories and
statistics.

I did not find how to configure this in "Archive artifacts" section, and
the "delete old builds" option is not what I want, because it deletes
all build histories and statistics altogether. I just want to get rid of
those old archived artifacts.

I know this can be done very easily by a shell or ant script, but I
consider those scripts as somehow dangerous, because they have no
knowledge of Jenkins job boundary, may delete other jobs or important
Jenkins config files by accident.

I prefer this to be done by Jenkins archive plugin itself (or is this a
core functionality?) , am I overseeing the configuration, or this
feature is not supported now?

If Jenkins has no built-in solution for these, are there any safer way
(than naked scripts) to do so?

Any suggestions iould be greatly appreciated.

regards
-- vf

Kamal Ahmed

unread,
Aug 5, 2011, 6:00:59 PM8/5/11
to jenkins...@googlegroups.com
Maybe
https://wiki.jenkins-ci.org/display/JENKINS/ArtifactDeployer+Plugin
plus, as it mentions

An external system (not Jenkins) is responsible for deleting the archived artifacts.
i know it does not help much as per your wish, but i will do some more digging , Maybe write a simple plugin ?
-K

Bap

unread,
Aug 5, 2011, 6:01:27 PM8/5/11
to jenkins...@googlegroups.com
Quoting John Vacz <mailing.lis...@googlemail.com>:

Check the box next to "Discard Old Builds"
Underneath the two text boxes, and on the right is a button labelled
"Advanced"
Click the button - the two new text boxes are what you are looking for.

Bap.

John Vacz

unread,
Aug 5, 2011, 6:18:27 PM8/5/11
to jenkins...@googlegroups.com

Thanks Bap! That looks like exactly what Im looking for. For whatsoever
reason I did see that before.

greetings
-- vf

John Vacz

unread,
Aug 5, 2011, 6:21:53 PM8/5/11
to jenkins...@googlegroups.com
On 06.08.2011 00:00, Kamal Ahmed wrote:
Maybe
https://wiki.jenkins-ci.org/display/JENKINS/ArtifactDeployer+Plugin
plus, as it mentions

An external system (not Jenkins) is responsible for deleting the archived artifacts.
i know it does not help much as per your wish, but i will do some more digging , Maybe write a simple plugin ?
-K

Yes. In long term we definitly need to move to an external repository.
Reply all
Reply to author
Forward
0 new messages