8
votes
  • I have one Pipeline job for each component in my Jenkins 2.0. All of them consist of many stages (build, UT, IT etc.), so they're working as a pipeline for a component.
  • The components are depending on each other in a specified order, so I used "Build after other projects are built" (I also tried JobFanIn Plugin) to trigger these "mini-pipelines" after each other. This works like a pipeline of "mini pipelines"

I'd like to visualize the relationship between the jobs. For this purpose I've found 2 plugins:

Both introduce a new View type, but none of them supports the "Pipeline" or "Multibranch pipeline" job types (introduced in Jenkins 2.0), these jobs are not visible in the related dropdown list on the view config page.

How can I visualize the relation of these job types? Is there any other plugin which supports these types?

2
I'm wondering the same thing. I haven't been able to find anything thus far.nickcodefresh
Yeah, I also asked if there is a better way of defining those dependencies. Maybe I'll do a Multijob. But this is not exactly what I am looking for. stackoverflow.com/questions/66104021/…eDeviser

2 Answers

1
votes

Thinking about this.

I don't think a visualisation of multi branch pipelines makes sense in the same way it would for a single branch build. The reason is that each bench of a mb pipeline can have a different build configuration. Eg with master triggering a promotion job but branch doing something else or nothing.

Do the best one could do I think is trace an individual build number and it's links. Can't do it at the job level.

0
votes

Jenkins blue ocean plugins give the rich view to visualize all types (parallel, sequential stages) view out of the box.

Let say if you have a pipeline like this

pipeline {
    agent any;
    stages {
        stage('build') {
            stages {
                stage('compile') {
                    steps {
                        echo "steps for unitest"
                    }
                }
                stage('security scan') {
                    parallel {
                        stage('sonarqube') {
                            steps {
                                echo "steps for parallel sonarqube"
                            }
                        }
                        stage('blackduck') {
                            steps {
                                echo "steps for parallel blackduck"
                            }
                        }
                    }
                }
                stage('package') {
                    steps {
                        echo "steps for package"
                    }
                }
            }
        }
        stage('deployment') {
            stages {
                stage('dev') {
                    steps {
                        echo "Development"
                    }
                }
                stage('pp') {
                    when { branch 'master' }
                    steps {
                        echo "PreProduction"
                    }
                }
                stage('prod') {
                    when { 
                        branch 'master' 
                        beforeInput true
                    }
                    input {
                        message "Deploy to production?"
                        id "simple-input"
                    }
                    steps {
                        echo "Production"
                    }
                }
            }
        }
    }
}

It will visualize like this :

enter image description here

is this what you are looking for? Note- it can customize. but this view is per build ..you can't create a dashboard from it and combine it all in one