jenkins parallel streams with local files?

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

jenkins parallel streams with local files?

red 888

My parallel steps need access to a local file in the workspace of the job. But it seems they can access it?

I tried listing the workspace in each stream:


powershell "ls ${workspace}"


they are all empty! Each stream has its own workspace and the output of each stream ls C:\workspace\branch_name@<stream#> shows no files.

How they get access to the main workspace? they're pretty much useless to me if they can't even access local files.


I understand this could create a race condition, is there at least a feature to copy files from the main workspace to the stream workspaces?

--
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/6ecc868e-4493-4056-9938-152b45b79f8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins parallel streams with local files?

Mark Waite-2
The "stash" step stores files from a workspace.  The "unstash" step retrieves previously stored stashes.

Mark Waite

On Fri, Dec 22, 2017 at 5:16 PM red 888 <[hidden email]> wrote:

My parallel steps need access to a local file in the workspace of the job. But it seems they can access it?

I tried listing the workspace in each stream:


powershell "ls ${workspace}"


they are all empty! Each stream has its own workspace and the output of each stream ls C:\workspace\branch_name@<stream#> shows no files.

How they get access to the main workspace? they're pretty much useless to me if they can't even access local files.


I understand this could create a race condition, is there at least a feature to copy files from the main workspace to the stream workspaces?

--
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/6ecc868e-4493-4056-9938-152b45b79f8d%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/CAO49JtHA5fUhyPF11hOdAn2zeLzcKNuCpExF3oQmLPGVeMxFJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: jenkins parallel streams with local files?

red 888
Thanks! That was just what I needed, but now I have a question about how to clear out the stash for each run. Just made a new post for this question.

On Friday, December 22, 2017 at 7:18:47 PM UTC-5, Mark Waite wrote:
The "stash" step stores files from a workspace.  The "unstash" step retrieves previously stored stashes.

Mark Waite

On Fri, Dec 22, 2017 at 5:16 PM red 888 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Hf8woSBuAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fakemai...@...> wrote:

My parallel steps need access to a local file in the workspace of the job. But it seems they can access it?

I tried listing the workspace in each stream:


powershell "ls ${workspace}"


they are all empty! Each stream has its own workspace and the output of each stream ls C:\workspace\branch_name@<stream#> shows no files.

How they get access to the main workspace? they're pretty much useless to me if they can't even access local files.


I understand this could create a race condition, is there at least a feature to copy files from the main workspace to the stream workspaces?

--
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="Hf8woSBuAwAJ" 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/6ecc868e-4493-4056-9938-152b45b79f8d%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/6ecc868e-4493-4056-9938-152b45b79f8d%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/6ecc868e-4493-4056-9938-152b45b79f8d%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/6ecc868e-4493-4056-9938-152b45b79f8d%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/dff0f128-856f-4421-afbb-0e1573ada850%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.