def actionTest = null
loadList = ["beijing", "chengdu","123","shanghai"," usa","jp","11.11.11.111","99.88.88.88"]
actionTest = loadList.collectEntries {
["开始数数 ${it}":load_test(it)]
}
def load_test(nodeIp) {
return {
print("开始执行测试...")
}
}
pipeline {
agent any
options {
timeout(time: 1, unit: 'MINUTES')
ansiColor('xterm')
// disableConcurrentBuilds()
}
//此处即可开始进行代码部署操作
stages {
stage("执行测试") {
steps {
script {
//
parallel actionTest //调用入口
sh 'sleep 1'
}
}
}
}
}
jenkinsfile遍历
最新推荐文章于 2024-03-08 19:42:12 发布