问题
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