How to trigger "Scan Multibranch Pipeline Now"

 Hey everyone 😀, Sometimes developers face a common issue related to trigger a job using the Jenkins pipeline. As we all know to trigger Freestyle Job using pipeline  we write code something similar which is mention below

build JOB_NAME;

but what if we want to trigger a multi-branch job or trigger Scan Multibranch Pipeline Now. If we try to trigger a multibranch job by using the above code  it gives an error, something similar like 

ERROR: Waiting for non-job items is not supported



As we see it doesn't work, the reason is that it is a non-wait type job item, so the only thing we need to do is to add a wait=false statement in the code.







I know it's not so big thing but sometimes people missed this little thing.
Hope you enjoyed my blog post.😎 

Comments

Popular posts from this blog

How to pass parameters in webhook?

Access and modify all the resources of our Wiki.js using WikiJS API

Fahrenheit to Celsius