我正在尝试将200多个Jenkins作业从他们当前的GUI制作配置转换为DSL脚本。 这是一个繁琐的过程,而且非常缓慢。
Jenkins正在Windows 2012服务器上运行。 Jenkins版本是1.650,我们使用的是Job DSL插件版本1.51。
我们为所有Jenkins工作使用diskcheck插件,我不能在我的生活中找到任何在线的地方,这解释了在使用DSL时调用它。 API查看器似乎不包含此插件,因此我认为我需要使用配置块。 我没有必要做任何事情,但无论如何,在网上找不到任何解释这涉及的内容。
有谁知道我需要做什么? 我只想要生成的作业在运行前检查磁盘空间,如果低于某个阈值则失败。
一般来说,使用配置块的信息对于之前没有这样做的人来说是非常没用的,所以如果有人知道任何有关此的好文档也会受到赞赏。
I'm attempting to convert 200+ Jenkins jobs from their current GUI-made configurations to DSL scripts. It's a tedious process and really slow.
Jenkins is running on a Windows 2012 server. The Jenkins version is 1.650 and we are using the Job DSL plugin version 1.51.
We use the diskcheck plugin for all Jenkins jobs and I cannot for the life of me find anywhere online which explains calling this when using the DSL. The API viewer doesn't appear to include this plugin so I presume I need to use the configure block. I haven't had to do this yet for anything but regardless, can find nothing online explaining what this involves.
Does anyone know what I need to do? I just want to the job which is generated to check the disk space before running and to fail if it is below some threshold.
In general the information on using the configure block is pretty useless for someone who hasn't done this before so if anyone knows of any good documentation on this that would be appreciated too.
最满意答案
job('your job') { description("") configure { it / 'buildWrappers' / 'org.jenkinsci.plugin.Diskcheck'(plugin: 'diskcheck@0.30'){ failOnError('false') } } } job('your job') { description("") configure { it / 'buildWrappers' / 'org.jenkinsci.plugin.Diskcheck'(plugin: 'diskcheck@0.30'){ failOnError('false') } } }更多推荐
发布评论