Checkout will put the files on agent, I need it on master node Jenkins

13 views
Skip to first unread message

SARDARNI NK

unread,
May 11, 2020, 6:44:09 PM5/11/20
to Jenkins Users
Hi Everyone,

 The checkout will put the files on the agent, I need it on the master node.

Could anyone can help me.

Is there anyway to setup another Jenkins job that can copy the code on the master?

Currently, I am copy file.sh in manually on the master, and calling that file in Jenkins job using 

In job, I am using execute groovy system script plugin and passing the Master node local path  /home/file.sh

def sout = new StringBuilder(), serr = new StringBuilder()

def proc = '/home/file.sh'.execute()

proc.consumeProcessOutput(sout, serr)

I am not sure if in executed groovy system script we can so pass svn path location.


Thanks,
Nav



Jan Monterrubio

unread,
May 11, 2020, 8:54:11 PM5/11/20
to jenkins...@googlegroups.com
You can run jobs on master, there’s a “specify where to run” option and if you put master on there the checkout And any scripts should be on master. 

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d1dd39b2-4851-4784-a18b-3a6f0fe50e77%40googlegroups.com.

SARDARNI NK

unread,
May 11, 2020, 9:10:39 PM5/11/20
to Jenkins Users
Thank you.
Master node executors 0 and we don't to provide executors to any numbers for good practices.

I am not using any labels on the job too.

Thanks,
Nav

Mark Waite

unread,
May 11, 2020, 9:24:22 PM5/11/20
to Jenkins Users
You might consider treating the file that you want to store on the master as an artifact.  The artifact is then available from the master even if the agent workspace is deleted.  That doesn't place it at an exact location, but does retain it even after a workspace is removed.

--
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-use...@googlegroups.com.

SARDARNI NK

unread,
May 11, 2020, 11:13:35 PM5/11/20
to Jenkins Users
Thank you Mark let me try this approach.

Thanks,
Nav

Reply all
Reply to author
Forward
0 new messages