stage('Parallel1') {
parallel 'branch1': {
node('n1') { stage('Unit 1') { echo "1" } }
}, 'branch2': {
node('n2') { stage('Unit 2') { echo "2" } }
}
}
}
* Result: Starting with version 0.5, steps in a stage must be in a steps block
stages {
steps {
parallel 'branch1': {
node('n1') { stage('Unit 1') { echo "1" } }
}, 'branch2': {
node('n2') { stage('Unit 2') { echo "2" } }
}
}
}
* Result: Invalid step "stage" used - not allowed in this context - The stage step cannot be used in Declarative Pipelines