How to define and iterate over map in Jenkinsfile : <p>My knowledge of groovy doesn't go very far beyond what little I know about Jenkinsfiles. I'm trying to figure out if it's possible to have a map defined in a Jenkinsfile that can then be applied in a "for loop" fashion. </p>

<p>I have these variables:</p>

<pre><code>mymap = {
    "k1": "v1"
    "k2": "v2"
    "k3": "v3" 
}
</code></pre>

<p>I have a <code>stage</code> in my Jenkinsfile that looks like this:</p>

<pre><code>stage('Build Image') {
    withCredentials([[&lt;the credentials&gt;]) {
    sh "make build KEY={k1,k2,k3} VALUE='{v1,v2,v3}'"
}
</code></pre>

<p>Is there a way to make a <code>Build Image</code> stage for each of the pairings in <code>mymap</code>? I haven't had any luck with what I've tried.</p>
