How do I purge/clobber stashed files?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I purge/clobber stashed files?

red 888

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.

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: How do I purge/clobber stashed files?

Mark Waite-2
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

On Wed, Dec 27, 2017 at 10:44 AM red 888 <[hidden email]> wrote:

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.

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF-34WcWgL%2BUVHnzgLF75yD3vvyvph-q2v40mayQeWOvw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How do I purge/clobber stashed files?

red 888
The problem was I wasn't cleaning up the workspaces of the streams. I thought their workspaces were destroyed automatically but they persist.

On Wednesday, December 27, 2017 at 1:04:30 PM UTC-5, Mark Waite wrote:
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

On Wed, Dec 27, 2017 at 10:44 AM red 888 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3KKn4ZriBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fakemai...@...> wrote:

<a href="https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#code-stash-code-stash-some-files-to-be-used-later-in-the-build" rel="nofollow" style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;color:rgb(0,89,153)" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fpipeline%2Fsteps%2Fworkflow-basic-steps%2F%23code-stash-code-stash-some-files-to-be-used-later-in-the-build\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEwZor9qNjXsW6flqnMgDBG5JcFFg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjenkins.io%2Fdoc%2Fpipeline%2Fsteps%2Fworkflow-basic-steps%2F%23code-stash-code-stash-some-files-to-be-used-later-in-the-build\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEwZor9qNjXsW6flqnMgDBG5JcFFg&#39;;return true;">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.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3KKn4ZriBAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/b879399c-2179-485c-bfdc-793769b70227%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b879399c-2179-485c-bfdc-793769b70227%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/b879399c-2179-485c-bfdc-793769b70227%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/b879399c-2179-485c-bfdc-793769b70227%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e2ad559b-9718-4ae4-955c-47256873f9c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.