我正在嘗試向我的jenkins作業dsl添加一個調用,該工作將配置作業以授予另一個構建的權限以複製工件。然而,我無法詹金斯工作DSL API中找到它的命令: https://jenkinsci.github.io/job-dsl-plugin/Jenkins用於副本權限的DSL API
此命令是否存在?有沒有辦法設置我的groovy做到這一點,如果沒有?
我正在嘗試向我的jenkins作業dsl添加一個調用,該工作將配置作業以授予另一個構建的權限以複製工件。然而,我無法詹金斯工作DSL API中找到它的命令: https://jenkinsci.github.io/job-dsl-plugin/Jenkins用於副本權限的DSL API
此命令是否存在?有沒有辦法設置我的groovy做到這一點,如果沒有?
有沒有內置的DSL設置該權限,但您可以使用Automatically Generated DSL:
job('example') {
properties {
copyArtifactPermissionProperty {
projectNames('one, two')
}
}
}
是不是one?
job('example') {
steps {
copyArtifacts('upstream') {
includePatterns('*.xml', '*.properties')
excludePatterns('test.xml', 'test.properties')
targetDirectory('files')
flatten()
optional()
buildSelector {
latestSuccessful(true)
}
}
}
}
編輯 看來,這可能已被固定在google group for job-dsl
configure { project ->
project/'properties'/'hudson.plugins.copyartifact.CopyArtifactPermissionProperty'/'projectNameList' {
'string' "*-foo"
}
}
我想他們可能雖然改變了接口,你現在需要提供明確的作業名稱,但我沒有插件,所以我不能檢查
這是實際複製工件的人。我試圖給予工作許可,以便它可以複製工件。 – user1449109