2017-03-03 47 views

回答

3

有沒有內置的DSL設置該權限,但您可以使用Automatically Generated DSL

job('example') { 
    properties { 
    copyArtifactPermissionProperty { 
     projectNames('one, two') 
    } 
    } 
} 
0

是不是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" 
    } 
} 

我想他們可能雖然改變了接口,你現在需要提供明確的作業名稱,但我沒有插件,所以我不能檢查

+0

這是實際複製工件的人。我試圖給予工作許可,以便它可以複製工件。 – user1449109