简体   繁体   中英

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.

您可以创建一个单独的作业来处理job-dsl,然后通过“build job:xxx”步骤从工作流中使用适当的参数调用它。

Not quite sure where you are going with this, but perhaps what you really want is multibranch binding for Job DSL, or to manually iterate branches.

Alternately, with Workflow alone you can probably accomplish your goal, whatever that is.

It seems that the jobDSL method can be used in the pipeline.

Have a look into the Snippet Generator to generate some code : 在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM