Jenkins declarative pipeline 1.3 run parallel for all jobs

╄→尐↘猪︶ㄣ 提交于 2019-12-13 05:13:39

问题


I have setup a pipeline project similar to https://jenkins.io/doc/book/pipeline/syntax/#parallel-stages-example and it works fine.

But I have created the same project for different jobs, so rather than creating new jobs can I run for loop for all jobs e.g. jobs = [job1, job2, job3] and run above pipeline code for different jobs.

Something similar to https://jenkins.io/doc/book/pipeline/syntax/#script-example

Can I use a for loop or similar logic to run a declarative pipeline?

I found similar question but not sure how to modify fo this Is it possible to create parallel Jenkins Declarative Pipeline stages in a loop?

来源:https://stackoverflow.com/questions/52086102/jenkins-declarative-pipeline-1-3-run-parallel-for-all-jobs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!