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)
> On 18.10.2016, at 00:58, Jonathan Hodgson <j.r.h...@gmail.com> wrote:
>
> 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.
The script _is_ evaluated on the master.
FilePath would do it,
or just not using Pipeline as a general purpose scripting language (it's not meant to be).
Write a batch/shell script instead if you need to prepare the workspace.
Did you miss my last post? I tried FilePath, but I get a "unable to resolve class" error.
I'm in a powerfull object oriented cross platform language, but to do anything useful I have to drop into platform specific archaic shell environments? Writing clunky code which has to be different for each platform
I've had zero success getting sh to work on windows
On Tuesday, October 18, 2016 at 8:09:56 AM UTC-4, Jonathan Hodgson wrote:Did you miss my last post? I tried FilePath, but I get a "unable to resolve class" error.Do not attempt to use `FilePath` from Pipeline script. It will not work.
I'm in a powerfull object oriented cross platform language, but to do anything useful I have to drop into platform specific archaic shell environments? Writing clunky code which has to be different for each platformThere are plenty of platform-independent scripting languages out there. Ruby, Python, etc. Groovy (run as an external process!), for that matter.
I've had zero success getting sh to work on windows
Use `bat` on Windows. There is a `isUnix` step that may be used to select a Unix-vs.-Windows variant.
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
--
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+unsubscribe@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.
For more options, visit https://groups.google.com/d/optout.
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