我正在尝试使用 jenkins DSL 生成 buildMonitorView,但始终会生成 ListView。我的DSL如下:
private static void generateBuildMonitorView(dslFactory, viewName, viewDescription, viewRegex) {
dslFactory.buildMonitorView(viewName) {
description(viewDescription)
jobs {
regex(viewRegex)
}
}
}
当我查看生成的视图 XML 时,我看到以下内容:
<hudson.model.ListView>
<owner class="com.cloudbees.hudson.plugins.folder.Folder" reference="../../.."/>
<name>ViewName</name>
<description>Builds</description>
<filterExecutors>true</filterExecutors>
<filterQueue>true</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
<jobNames>
<comparator class="hudson.util.CaseInsensitiveComparator"/>
</jobNames>
<jobFilters/>
<columns>
<hudson.views.BuildButtonColumn/>
<hudson.views.StatusColumn/>
<hudson.views.WeatherColumn/>
<hudson.views.JobColumn/>
<hudson.views.LastSuccessColumn/>
<hudson.views.LastFailureColumn/>
<hudson.views.LastDurationColumn/>
</columns>
<includeRegex>^.+-BuildName$</includeRegex>
<recurse>false</recurse>
</hudson.model.ListView>
查看 github,我看到 BuildMonitorView 扩展了 ListView,但不包含任何将其与 ListView 区分开来的内容。
我已经安装并启用了构建监视器视图插件,所以我假设这不是问题,因为我可以手动创建它们。有没有人使用 jenkins DSL 生成 BuildMonitorView?