How do I purge/clobber stashed files?

14 views
Skip to first unread message

red 888

unread,
Dec 27, 2017, 12:44:13 PM12/27/17
to Jenkins Users

Jenkins docs seem ambiguous about this:

Stashed files are not otherwise available and are generally discarded at the end of the build.

Soooo "generally" means what? They should get discarded by default? Do I need to do something to have them discarded?


Because my stashed files aren't getting discarded. I run this in my job:

stash name: "myZip", includes: "${differentEveryTime}.zip"


And every time the job runs it keeps adding the new zip file to the "myZip" stash.

I couldn't find anything in the docs about how to control this. I want myZip to clobber everything previously or start empty each job run.

Mark Waite

unread,
Dec 27, 2017, 1:04:30 PM12/27/17
to jenkins...@googlegroups.com
That seems like a bug to me if I've understood your phrasing correctly.

I don't expect the stash from one build (for example, build number 14) to be included in later builds (for example, build number 15).

Within a single build (for example, build number 14), I would initially assume (until proven otherwise) that multiple references to write to a stash of the same name would append to a single stash.

Mark Waite

--
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/b879399c-2179-485c-bfdc-793769b70227%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

red 888

unread,
Dec 28, 2017, 6:39:27 AM12/28/17
to Jenkins Users
The problem was I wasn't cleaning up the workspaces of the streams. I thought their workspaces were destroyed automatically but they persist.
Reply all
Reply to author
Forward
0 new messages