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
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.
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.
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.
Found the right pattern via trial and error:
build 'maven-release-workflow-test/master'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With