I am building a Jenkins Declarative Pipeline.
Here's a gist of what I'm trying to do(as an arbitrary example)-
- There is a list of platforms. I have put those in a matrix cell for readability and parallelism.
- Each of them has an associated browser.
I want the matrix to be executed so that each Key-Values list iterates together.
For Example-
Platforms = ["Windows", "Mac", "Linux"]
Browsers = ["Edge", "Chrome", "Firefox"]
I want the output stages to have these pairings for (Platforms,Browsers)-
[("Windows", "Edge"),("Mac", "Chrome"),("Linux", "Firefox")]
In the actual case, this list is 12 long, so I don't want to define as many stages with when directives to pair these values manually, since everything else is the same in these stages.
Is there a way to do this, or a better approach?