eDeviser
eDeviser

Reputation: 1873

How to define up- and downstream dependencies between multibranch-pipeline-jobs in jenkins?

In the past I used only freestyle jobs in jenkins. I used the Build Pipeline plugin to visualize the up- and downstream dependencies. This was a great feature and it was easy to understand the dependencies between the jobs.

Now I started using several Multibranch-Pipline-Jobs which is a much better choice for my jobs. But I wonder how can I define and visualize up- and downstream dependencies?

Upvotes: 0

Views: 558

Answers (1)

IgnSabbag
IgnSabbag

Reputation: 151

Maybe it's late, but I solved it by adding this step to Jenkinsfile.

    stage('trigger') {
        steps {
            script {
                def jobName = env.JOB_NAME.replaceFirst("currentJob", "nextJob")
                build job: jobName, wait: false
            }
        }
    }

In my case, the urls are: /branches/1.0/currentJob /branches/1.0/nextJob

Upvotes: 1

Related Questions