Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trigger Multibranch Pipeline Jenkins Job within regular pipeline job?

I want to trigger a specific multibranch pipeline job 'maven-release-workflow-test' (specific branch) within a regular pipeline job. Is there a special build() command pattern that i need to specify?

The snippet generator just prints:

no such job maven-release-workflow-test

like image 568
Jotschi Avatar asked May 19 '16 11:05

Jotschi


People also ask

How do you trigger a Jenkins pipeline from another pipeline?

You can follow the below steps to trigger a Jenkins pipeline in another Jenkins pipeline. Select a job that triggers a remote one and then go to Job Configuration > Build section > Add Build Step > Trigger builds on remote/local projects option.

How do I enable the Multibranch pipeline in Jenkins?

Head over to your Jenkins instance and create a new item. Enter a name for the job, and select the “Multibranch Pipeline” option at the end of the screen. Then, click on the OK button. In the next screen, go to the “Branch sources” tab, click on the “Add source” button, and choose “Git” from the dropdown menu.

What is the difference between pipeline and Multibranch pipeline in Jenkins?

Jenkins Pipeline Vs. Multibranch Pipeline. A multibranch pipeline is meant for building multiple branches from a repository and deploy to multiple environments if required. A pipeline job supports both pipeline steps to be added in Jenkins configuration and form SCM.


1 Answers

Found the right pattern via trial and error:

build 'maven-release-workflow-test/master'
like image 99
Jotschi Avatar answered Sep 27 '22 19:09

Jotschi