Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build a pipeline as shown in blue oceans beta project page

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 !

like image 753
user1619524 Avatar asked Dec 17 '16 12:12

user1619524


People also ask

What is Blue Ocean pipeline?

Blue Ocean is a Jenkins plugin that enhances the user experience based on a personalised modern design. It has been built from the ground up to provide an interactive view of the Jenkins pipeline. It reduces the clutter and increases clarity for all users.

How do I create a pipeline project in Jenkins?

To create a simple pipeline from the Jenkins interface, perform the following steps: Click New Item on your Jenkins home page, enter a name for your (pipeline) job, select Pipeline, and click OK. In the Script text area of the configuration screen, enter your pipeline syntax.


1 Answers

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:

  • cloudbees.com
  • jenkins pipeline examples

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.

like image 142
Stefan Crain Avatar answered Oct 10 '22 03:10

Stefan Crain