DSL parallel stage from dynamic list using pure DSL instead of scripted

42 views
Skip to first unread message

Vineeth Thampi

unread,
Jul 16, 2021, 6:17:39 AM7/16/21
to Jenkins Users
Hi,

I am trying to create a jenkins pipeline that can run parallel stages based on a dynamic list. Went through doc https://www.jenkins.io/doc/book/pipeline/syntax/#parallel but could not find a way to do the parallel stages based on a dynamic list. I found ways to achieve the same by using scripted pipelines (https://www.jenkins.io/doc/pipeline/examples/#parallel-from-list), but was wondering if there is a way to do that with pure DSL. 

Thanks

Vineeth

Ivan Fernandez Calvo

unread,
Jul 16, 2021, 12:17:06 PM7/16/21
to Jenkins Users
There is an implementation on the declarative pipeline https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-matrix 
it has some limitations like the amount of generated code that sometimes you have to extract the code to functions, and it does not allow to grab axis from variables.
To avoid those limitation we implemented something similar in our shared pipeline library

Reply all
Reply to author
Forward
0 new messages