2017-03-03 48 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