如何将作业放入jenkins的文件夹中? [英] How to put jobs inside a folder in jenkins?
本文介绍了如何将作业放入jenkins的文件夹中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用jenkins DSL脚本将作业放入文件夹中 现在,我创建一个listView,并将我正在使用的代码放在这里
I'm trying to put jobs inside a folder using jenkins DSL script Now i create a listView and i put inside my jobs here the code i'm using
listView('MyJobsList') {
jobs {
map.each{
name((it.key).trim())
}
}
columns{
status()
weather()
name()
lastSuccess()
lastFailure()
lastDuration()
buildButton()
}
}
我想做同样的事情,但是这次我想把工作放在一个文件夹中!!
i want to do the same thing but this time i want to put the jobs in a folder !!
推荐答案
请参考下面的Job-DSL文档,通过Job-DSL在Jenkins中创建一个文件夹.
Please refer the below Job-DSL documentation to create a folder in Jenkins through Job-DSL.
folder('folder-a') {
description('Folder containing all jobs for folder-a')
}
job('folder-a/job-a') {
// Job config goes here
}
这篇关于如何将作业放入jenkins的文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文