-
Type:
New Feature
-
Resolution: Duplicate
-
Priority:
Critical
-
Component/s: lockable-resources-plugin, pipeline-model-definition-plugin
-
None
-
Environment:Jenkins 2.138.1
I don't want nest parallel in parallel.
My use case is locking a resource for the parallel and sequential stages as a whole:
pipeline {
agent any
stages {
stage('Lock wrapper') {
options {
lock('resource')
}
stages {
stage('Sequential 1') {
steps {
echo "Sequential 1"
}
}
stage('Sequential 2') {
parallel {
stage('Parallel 2a') {
steps {
echo "Parallel 2a"
}
}
}
}
}
}
}
}
But this gives following error:
Parallel stages or branches can only be included in a top-level stage.
My final pipeline has far more than these stages, so lock of the whole pipeline is not an option.
- duplicates
-
JENKINS-53734 Declarative pipeline - Support for parallel stages inside sequential stages
-
- Closed
-