I am trying to write a Jenkinsfile
that executes in parallel a sequence of steps. The goal is to have two agents
(aka. nodes
). One should do a windows build and the other a linux build. However I do not want this to happen sequentially but in parallel. I am trying to find documentation for the parallel
directive that is described in Pipeline - Parallel execution of tasks.
I found one occurence of parallel
one on the Jenkins, but it seems the documentation is broken: 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
How should I setup a Jenkinsfile that can execute a series of build steps on two different agents (one linux, one windows) in parallel?
In particular, should I rather use the declarative or script based pipeline DSL?