Answers for "jenkins declarative pipeline for loop"

0

jenkins declarative pipeline for loop

def map = [
        Bob  : 42,
        Alice: 54,
        Max  : 33
]

pipeline {
    agent any

    stages {
        stage('Initialize') {
            steps {
                script {
                    map.each { entry ->
                        stage (entry.key) {
                            timestamps{
                                echo "$entry.value"
                            }
                        }
                    }
                }
            }
        }
    }
}
Posted by: Guest on July-21-2020

Code answers related to "jenkins declarative pipeline for loop"

Browse Popular Code Answers by Language