Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Group stages in parallel

I want to have a parallel pipeline like

parallel (
    "stream1" {
    }
    "stream2" {`
    }
    "stream3" {`
    }
)

where I can add stages(two in each stream) and show them as in the attachment.enter image description here

Currently it works as the below enter image description here

How can I make the stages to be visible in blue ocean?

like image 381
Ashot Arakelyan Avatar asked May 15 '26 05:05

Ashot Arakelyan


1 Answers

Yes this is possible with Declarative Pipeline 1.3 and above. Following sample code will work for example you have shared.

stages {
  stage("Build") {
    steps {
      echo "Executing Build"
    }
  }
  stage ("Parallel Builds") {
    parallel {
      stage("stream1") {
        stages {
          stage("JUnit") {
            steps {
              echo "Executing JUnit"
            }
          }
          stage("Firefox") {
            steps {
              echo "Executing Firefox"
            }
          }
        }
      }
      stage("stream2") {
        stages {
          stage("DBUnit") {
            steps {
              echo "Executing DBUnit"
            }
          }
          stage("Edge") {
            steps {
              echo "Executing Edge"
            }
          }
        }
      }
      stage("stream3") {
        stages {
          stage("Jasmine") {
            steps {
              echo "Executing Jasmine"
            }
          }
          stage("Safari") {
            steps {
              echo "Executing Safari"
            }
          }
        }
      }
    }
  }
  stage("Dev") {
    steps {
      echo "Executing Dev"
    }
  }
}

For Official documentation please refer to: enter link description here

like image 89
Navaneetha Avatar answered May 18 '26 05:05

Navaneetha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!