Re: Pipeline : Confused about file access on slaves

2016-10-21 Thread Jonathan Hodgson
On Friday, October 21, 2016 at 6:11:28 PM UTC+1, Baptiste Mathus wrote: > > 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.

Re: Pipeline : Confused about file access on slaves

2016-10-21 Thread Baptiste Mathus
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

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jonathan Hodgson
On Tuesday, October 18, 2016 at 3:21:09 PM UTC+1, Jesse Glick wrote: > > 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

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jesse Glick
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

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jonathan Hodgson
Ok, well it seems the "unable to resolve class" issue was due to me not importing the class. Got thrown by the fact that File is there, hadn't really clicked that FilePath was a hudson specific class rather than standard Groovy. Still looking for how to find the channel -- You received this

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jonathan Hodgson
Hi Daniel, thanks for trying to help, however On Tuesday, October 18, 2016 at 12:28:18 PM UTC+1, Daniel Beck wrote: > > > > On 18.10.2016, at 00:58, Jonathan Hodgson > wrote: > > > > The documentation says that File operates on "the current machine", > which I took

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Daniel Beck
> On 18.10.2016, at 00:58, Jonathan Hodgson 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

Re: Pipeline : Confused about file access on slaves

2016-10-18 Thread Jonathan Hodgson
Further investigation.. I thiought the solution might lie in FilePath as per here http://stackoverflow.com/questions/30608444/in-jenkins-job-create-file-using-system-groovy-in-current-workspace/32514581#32514581 But it seems that doesn't apply to Groovy in the pipeline, If I try to declare a

Pipeline : Confused about file access on slaves

2016-10-17 Thread Jonathan Hodgson
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