One thing to understand is that your pipeline is actually always to be run
from/on the master. Each "instruction" if actually sent from the master the
requested node, then kind of checkpointed before going further.

So, when you're using a pipeline, it's aware of that. When you're using
directly groovy, you end up running on the master.

That's one the reasons you should prefer using the pipeline-utility-steps
plugin for that matter, and in general keep your pipeline code as simple as
possible.

HTH

Le 18 oct. 2016 12:58 AM, "Jonathan Hodgson" <j.r.hodg...@gmail.com> a
écrit :

Hi,

I've touched on this stuff in a previous thread where I thought it was
about running on Windows, in turns out it's the same for any slave

So I'm starting a new thread now I'm clearer what the issue is

I have code that basically works like this

node('master') {  // Master is running Linus
    SET_STUFF_UP
}
platform_builders ["Mac"] = {
    node ("XCode")
    {
        BUILD_STUFF_ON_OSX
    }
}
platform_builders ["Windows"] = {
    node ("VS2013")
    {
        BUILD_STUFF_ON_WINDOWS
    }
}
parallel(platform_builders)


So, pretty standard.

Now what I don't understand is what I get when I try to access files.

In SET_STUFF_UP jenkins Buildsteps that access files (checkouts, DeleteDir,
etc) operate on the master (as expected) and Groovy's standard file
handling classes (File, FileNameFinder etc) also act on the master... so
that's all fine

but in BUILD_STUFF_IN_OSX and BUILD_STUFF_IN_WINDOWS buildsteps operate on
files on the slaves (as expected) while Groovy standard classes operate on
the master.

1) Is this expected? The documentation says that File operates on "the
current machine", which I took to mean the one actually running the code at
that moment, which is the slave. But that isn't hwat is happening

2) How do I get around it? Buildsteps just don't provide the functionality
I need, and doing stuff in shell scripts and batch files (which works as
expected) is really clunky.



-- 
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-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/jenkinsci-users/f314bd0d-7fea-469e-8616-8ad60ce1885f%40googlegroups.
com
<https://groups.google.com/d/msgid/jenkinsci-users/f314bd0d-7fea-469e-8616-8ad60ce1885f%40googlegroups.com?utm_medium=email&utm_source=footer>
.
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6%2B5LW9Be9BDA5624jaTP2AFnjrNSoA4mw66JQW4UVK_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to