On Thu 3 Aug 2017 at 21:09, bbyjenkns <[email protected]> wrote:

> You can't use normal groovy api since it only works on master.  Since
>> you're already using unix slaves, just use a normal shell step will save
>> you headaches.
>
>
> Why does the groovy api only work on master, but the sh step does? What is
> the point of having a global pipeline if it can only run on master?
>

The CPS "groovy" is only executed on master. You can use loads of different
steps in a node block to target that step at executing on the node... but
it depends on the actual step to fork processes...

Depending on how the step was written to fork the process you may lose the
"restartable jenkins" property of pipelines, e.g. If not based on durable
task api, or if not idempotent

Which is another reason not to think of pipeline as "groovy"

>
> On Wednesday, August 2, 2017 at 12:38:37 PM UTC-5, Cuong Tran wrote:
>>
>> You can't use normal groovy api since it only works on master.  Since
>> you're already using unix slaves, just use a normal shell step will save
>> you headaches.
>>
>> On Wednesday, August 2, 2017 at 7:26:01 AM UTC-7, bbyjenkns wrote:
>>>
>>> We have a somewhat different use case where we have a bunch of common
>>> config and build related files on NFS mount that need to be copied into
>>> each build workspace. What I need to do is copy a directory out of this NFS
>>> location and into workspaces as needed, a different directory per build
>>> type.
>>>
>>> Ideally I do this in groovy so I can get better exception handling and
>>> not be tied to OS specific commands, but everything I've tried is breaking,
>>> included the groovy preferred AntBuilder.copy() method.
>>>
>>> How would you copy a directory of files from outside of a workspace into
>>> a workspace?
>>>
>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/4e6d402b-6301-4399-8efb-0fa7d63c005a%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/4e6d402b-6301-4399-8efb-0fa7d63c005a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Sent from my phone

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CA%2BnPnMxp2w7KwZeyrhioqVOvTVwRPVf_DjhbpU4uDgjbdMD-NA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to