【发布时间】:2020-05-03 18:11:35
【问题描述】:
我正在尝试编写一个并行执行一系列步骤的Jenkinsfile。目标是拥有两个agents(又名nodes)。一个应该做一个windows build,另一个应该做一个linux build。但是,我不希望这种情况顺序发生,而是并行发生。我正在尝试查找Pipeline - Parallel execution of tasks 中描述的parallel 指令的文档。
我在 Jenkins 上发现了一个 parallel 的出现,但似乎文档已损坏:https://jenkins.io/doc/pipeline/steps/workflow-cps/
parallel: Execute in parallel
org.kohsuke.stapler.NoStaplerConstructorException:
There’s no @DataBoundConstructor on any constructor of class
org.jenkinsci.plugins.workflow.cps.steps.ParallelStep
我应该如何设置一个可以在两个不同的代理(一个 linux,一个 windows)上并行执行一系列构建步骤的 Jenkinsfile?
特别是,我应该使用声明式还是基于脚本的管道 DSL?
【问题讨论】: