| I am learning the Pipeline plugin by trying to wrap a portable project build and test routine into this paradigm. I started with the Multibranch approach and Declarative DSL syntax, and found that I can not make loops there. This issue splits to several use-cases, so I'll try to untangle this furball below: 1) Part of the test routine is also very patternized and parallelizable - it has to run several 'make $distcheckargs' jobs for several distcheck scenarios predefined in the project Makefile. I did manage to loop over this one as an array of strings, and ultimately even managed to build a list into a variable and then parallel() it, but only by forfeiting the DDSL syntax and using a script{} step. 2) The overall pipeline-contents code is same for different Unixish platforms supported by that project (including rather obscure and ancient ones) - so I want the resulting Jenkinsfile to loop over my agents with respective labels (VMs and physical hosts with those OSes), and push the same pipeline commands to them. So far I could not achieve this - I can not use script{} or parallel{} or variable assignment and loops at high levels in the pipeline code; I can not (in DDSL) nest stages to separate the OSes and contain CI steps; I can not wrap the pipeline{} block into a for-loop because pipeline{} apparently must be at the top level in a file, otherwise keywords defined for DDSL become invalid markup for the common DSL... I gather something of this sort is a relatively standard FOSS use-case, so it should be supported by DDSL (and if it happens to be implemented already - then it should get more visibly and explicitly documented and exemplified). |