I am doing parallel steps as -
stages {
stage (\'Parallel build LEVEL 1 - A,B,C ...\') {
steps{
parallel (
\"Build
You most definitely can. Try something like this:
stages {
stage ('Parallel build LEVEL 1 - A/C+B ...') {
parallel {
stage("Build A") {
agent { node { label 'A'}}
steps {
buildAndArchive(A)
}
}
stage("Build C and B") {
stages {
stage("Build C") {
agent { node { label 'C'}}
steps {
buildAndArchive(C)
}
}
stage("Build B") {
agent { node { label 'B'}}
steps {
buildAndArchive(B)
}
}
}
This will execute two branches in parallel, where one is building A, and the other sequentially building C and then B.
See also https://jenkins.io/blog/2018/07/02/whats-new-declarative-piepline-13x-sequential-stages/