7

I am new to Jenkins and looking for ways to automate and visualise workflows. I am able to chain few workflows/jobs together.

my workflow

I like to learn how to run workflows in parallel, like the picture shown in jenkins blue ocean beta page.

jenkins blue ocean

Many thanks !

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
user1619524
  • 1,484
  • 4
  • 16
  • 26
  • You should edit your question to reflect what you are really asking as it is extremely vague and misleading currently. That being said, I googled your real question and found these: https://www.cloudbees.com/blog/parallelism-and-distributed-builds-jenkins https://jenkins.io/doc/pipeline/examples/ – Matthew Schuchard Dec 17 '16 at 14:03
  • essentially, I like to run job2_a,b,c in parallel and be able to visualise as in picture – user1619524 Dec 18 '16 at 09:39

1 Answers1

5

Building Pipelines with parallel steps is well document in a few guides, I've found these to be the most effective places to find info for me personally:

I've also answered questions on how to properly set it up here (I know, shameless).


For the fun it here is the pipeline groovy script to build out the example [obviously missing the actual build commands].

node('master') {
    stage('Build') {
        sh "echo Build"
    }
    stage('Test'){
      parallel (
        "JUnit": { 
            sh "echo JUnit"
        },
        "DBUnit": { 
            sh "echo DBUnit"
        },
        "Jasmine": { 
            sh "echo Jasmine"
        },
      )
    }
    stage('Browser Tests'){
      parallel (
        "Firefox": { 
            sh "echo Firefox"
        },
        "Edge": { 
            sh "echo Edge"
        },
        "Safari": { 
            sh "echo Safari"
        },
        "Chrome": { 
            sh "echo Chrome"
        },
      )
    }
    stage('Dev'){
        sh "echo Dev"
    }
    stage('Staging'){
        sh "echo Staging"
    }
    stage('Production'){
        sh "echo Production"
    }
}

UI in action

demo of blueocean parallel pipeline

Cheers, and good luck.

Community
  • 1
  • 1
Stefan Crain
  • 2,010
  • 3
  • 21
  • 22