Parallel job Execution Through blue ocean

20 views
Skip to first unread message

pbasan...@gmail.com

unread,
Apr 4, 2019, 6:52:04 AM4/4/19
to Jenkins Users
Hi All,

Through Blue Ocean Plugin created a pipeline job and want to execute the Jobs inside the "Jenkinsfile" in parallel .
Need help on this ..here is the code which is executing sequentally
============
pipeline {
  agent any
  parallel {
  stages {
     stage('Init') {
      steps {
        echo 'Hello Testing'
        build 'TEST'
      }
    }
    stage('JOB1') {
      steps {
        build 'TEST1'
      }
    }
    stage('JOB2') {
      steps {
        build 'TEST2'
      }
    }
    }
  }
}
===================

Ivan Fernandez Calvo

unread,
Apr 4, 2019, 1:23:38 PM4/4/19
to Jenkins Users
it is incorrect, you have a stages directive inside parallel so you only have one stage filled with serial stages, the following pipeline is correct (if I do not make any pitfall with the {) see https://jenkins.io/doc/book/pipeline/syntax/#parallel

pipeline {
  agent any
  parallel {

Ivan Fernandez Calvo

unread,
Apr 4, 2019, 1:27:33 PM4/4/19
to Jenkins Users
I've messed with { :) the following is correct

pipeline {
  agent any
  stages {
    stage('parallel'){
      parallel {
        stage('Init') {
          steps {
            echo 'NOOP'
          }
        }
        stage('JOB1') {
          steps {
            echo 'NOOP'
          }
        }
        stage('JOB2') {
          steps {
            echo 'NOOP'
Reply all
Reply to author
Forward
0 new messages