0
下面是我要動態地添加新的管道視圖剖視圖插件的config.xml的部分「查看清單節」追加新的管道來「觀察上市節」使用工作DSL - 詹金斯
<hudson.plugins.sectioned__view.SectionedView plugin="[email protected]">
<owner class="hudson" reference="../../.."/>
<name>pipeline view</name>
<filterExecutors>false</filterExecutors>
<filterQueue>false</filterQueue>
<properties class="hudson.model.View$PropertyList"/>
<sections>
<hudson.plugins.sectioned__view.ViewListingSection>
<jobNames>
<comparator class="hudson.util.CaseInsensitiveComparator"/>
</jobNames>
<jobFilters/>
<name></name>
<width>FULL</width>
<alignment>CENTER</alignment>
<views>
<string>pipeline1</string>
<string>pipeline2</string>
</views>
<columns>1</columns>
</hudson.plugins.sectioned__view.ViewListingSection>
</sections>
</hudson.plugins.sectioned__view.SectionedView>
名爲「pipeline3」到這個config.xml,我使用的是同樣的作業DSL。以下是我嘗試過的代碼。
sectionedView('pipeline view') {
configure { node ->
node/sections/'hudson.plugins.sectioned__view.ViewListingSection'/ 'views'/string('pipeline3')
}
}
上面的代碼覆蓋了整個xml配置,而不是隻追加一個新值。
您能否爲我推薦一個解決方案?謝謝
謝謝您的回覆!有沒有辦法使用現有的視圖來更新配置,例如在作業的情況下,可以使用job('job1'){using('job1')configure {.....}}來更新作業' – shwetha