Re: Copying file from Master to slave

2019-02-26 Thread Ullrich Hafner
Additionally think carefully about the design of your code. Which part of the 
code should run on the master, which part on the slave. It might be also 
required to consider MasterToSlaveCallable.



> Am 26.02.2019 um 09:12 schrieb Joseph P :
> 
> You want to use FilePath class as much as possible, it has methods that work 
> regardless if it is on master or agent.
> 
> See the JavaDoc: https://javadoc.jenkins.io/hudson/FilePath.html
> 
> 
> On Tuesday, February 26, 2019 at 8:44:02 AM UTC+1, Nikhil Bhoski wrote:
> I have my plugin which creates a file in the jenkins workspace. however if i 
> configure slave and force the job to run on slave then i see file on slave is 
> not getting created.
> 
> I am using workspace.getRemote() to get the workspace path and Java 
> File.copy() utility to copy the file in workspace.getRemote() path . However 
> the file is not getting created on slave. Any suggestions to make it work ?
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-dev+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-dev/1e0a992a-6528-4f15-8399-e8ce0befb66f%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 Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/DF3C31E1-BF8F-4D18-96E0-06EAE2459E1A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP


Re: Copying file from Master to slave

2019-02-26 Thread Joseph P
You want to use FilePath class as much as possible, it has methods that 
work regardless if it is on master or agent.

See the JavaDoc: https://javadoc.jenkins.io/hudson/FilePath.html


On Tuesday, February 26, 2019 at 8:44:02 AM UTC+1, Nikhil Bhoski wrote:
>
> I have my plugin which creates a file in the jenkins workspace. however if 
> i configure slave and force the job to run on slave then i see file on 
> slave is not getting created. 
>
> I am using workspace.getRemote() to get the workspace path and Java 
> File.copy() utility to copy the file in workspace.getRemote() path . 
> However the file is not getting created on slave. Any suggestions to make 
> it work ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/1e0a992a-6528-4f15-8399-e8ce0befb66f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Copying file from Master to slave

2019-02-25 Thread Nikhil Bhoski
I have my plugin which creates a file in the jenkins workspace. however if 
i configure slave and force the job to run on slave then i see file on 
slave is not getting created. 

I am using workspace.getRemote() to get the workspace path and Java 
File.copy() utility to copy the file in workspace.getRemote() path . 
However the file is not getting created on slave. Any suggestions to make 
it work ?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/9faf41aa-a57a-49d6-89b5-1a5ec293461c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.