51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
|
pipeline {
|
||
|
agent any
|
||
|
stages {
|
||
|
stage('Non-Parallel Stage') {
|
||
|
steps {
|
||
|
echo 'This stage will be executed first.'
|
||
|
}
|
||
|
}
|
||
|
stage('Parallel Stage') {
|
||
|
when {
|
||
|
branch 'master'
|
||
|
}
|
||
|
failFast true
|
||
|
parallel {
|
||
|
stage('Branch A') {
|
||
|
agent {
|
||
|
label "for-branch-a"
|
||
|
}
|
||
|
steps {
|
||
|
echo "On Branch A"
|
||
|
}
|
||
|
}
|
||
|
stage('Branch B') {
|
||
|
agent {
|
||
|
label "for-branch-b"
|
||
|
}
|
||
|
steps {
|
||
|
echo "On Branch B"
|
||
|
}
|
||
|
}
|
||
|
stage('Branch C') {
|
||
|
agent {
|
||
|
label "for-branch-c"
|
||
|
}
|
||
|
stages {
|
||
|
stage('Nested 1') {
|
||
|
steps {
|
||
|
echo "In stage Nested 1 within Branch C"
|
||
|
}
|
||
|
}
|
||
|
stage('Nested 2') {
|
||
|
steps {
|
||
|
echo "In stage Nested 2 within Branch C"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|