Search code examples
jenkinsjenkins-pluginsjenkins-workflowjenkins-job-dsl

How to execute job dsl script in Jenkins workflow (pipeline) plugin


I am trying to combine nice branching handling of Workflow Multibranch with powerfull Job-Dsl plugin Job generation. So basically I want branch to regenerate it's jobs from script in repository and run the main one.

But I don't see a way to run Process Job DSLs step from workflow script. May be there is a built in way to execute custom steps in Workflow, but I just can't find it.


Solution

  • You could create a separate job that processes the job-dsl, and then call it with the proper parameters from the workflow via a "build job: xxx" step.