Jenkins pipeline, declarative.
simple question, how do I create a parallel stages inside stage which is parallel by itself?
pipeline {
agent { label 'master' }
options {
timestamps()
timeout(time: 15, unit: 'MINUTES')
ansiColor('xterm')
}
stages {
stage('Main parallel') {
parallel {
stage('Start containers') {
agent { label 'my-agent' }
stages {
stage('Start Linux containers') {
steps {
script {
dir (""){
println "running"
}
}
}
}
}
}
stage('Build UI') {
stages {
stage('Cleanup main workspace'){
steps {
dir("") {
cleanWs()
}
}
}
stage('Git checkout') {
steps {
dir("") {
checkout()
}
}
}
stages {
stage('Gradle build') {
parallel{
stage('gradle1') {
steps {
dir("") {
script {
buildInfo = rtGradle.run switches: gradleParams , tasks: 'clean deploy'
}
}
}
}
}
stage('gradle2') {
steps {
dir("") {
script {
buildInfo2 = rtGradle2.run switches: gradleParams , tasks: 'unitTests'
}
}
}
}
}
}
}
}
}
}
}
}
I am sure it is possible, but how?
thanks
"matrix" or "parallel" cannot be nested inside another "matrix" or "parallel"
- so I'm guessing it's not possible.