I have a parallel declaration like so:
parallel(first: {
step(...)
}, second: {
step(...)
})
Which works fine. Now, if I extend that by a function call:
def myFunc(num):
sh """\
mkdir -p ${num}
"""
node('myspecialslave') {
parallel(first: {
step(...)
myFunc(1)
}, second: {
step(...)
myFunc(2)
})
}
I no longer see first
and second
as being executed in parallel at all.
So my question is - what criteria are there so the closure gets executed in parallel?