Must build steps be Durable in order to run in parallel with Jenkins workflow? -
i'm experimenting parallel step in jenkins workflow. flow looks (essentially) this:
parallel 'deploy-a-machine': { node { input 'shall deploy machine?' step([$class: 'deploymachinebuilder', deploymentname: apodname]) } }, 'deploy-b-machine': { node { input 'shall deploy b machine?' step([$class: 'deploymachinebuilder', deploymentname: bpodname]) } } both inputs show running on different executors, when click "proceed" on both, first deploy starts. deploys run custom plugin written legacy jobs , converted minimally workflow. don't see obvious message waiting executor, deploy doesn't start. once first 1 finished, second 1 begin.
must implement durabletask (or thing?) before parallel step allow both run? conversion far has been light, maybe it's time try more true conversion.
assuming deploymachinebuilder simplebuildstep have written, indeed perform method block workflow virtual machine duration: groovy interpreter uses coöperative multitasking.
the simplest solution, feasible, use sh steps rather custom builder. survives slave disconnections and/or jenkins restarts, , displays incremental progress , works parallel. jenkins-26055 provide more convenient way define custom “durable” steps. jenkins-25879 provide more convenient way define steps not durable, @ least avoid blocking native thread (so behave better in parallel , log incrementally).
by way in sample script recommend moving input step outside of node block: there no point in hogging executor while waiting (perhaps indefinitely) user approval.
Comments
Post a Comment