📜  用于循环的詹金斯声明性管道 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:37.127000             🧑  作者: Mango

代码示例1
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"
                            }
                        }
                    }
                }
            }
        }
    }
}