0

我正在尝试使用 DSL 来生成使用copyArtifacts. 我已经能够Copy artifact from another project使用以下内容生成基本内容:

job('DSL-AgreegateArtifacts') {
  steps {
    copyArtifacts( 'Template-DSPL_RPub' )
  }
}

但是我还需要能够指定Which build,Artifacts to copyTarget directory. 我不清楚我如何使用Closure copyArtifactClosure来指定这些信息?我没有找到任何例子。

4

1 回答 1

2

CopyArtifacts的 Job DSL 参考中有一个示例:

job('example') {
    steps {
        copyArtifacts('upstream') {
            includePatterns('*.xml', '*.properties')
            targetDirectory('files')
            buildSelector {
                latestSuccessful(true)
            }
        }
    }
}
于 2015-08-11T12:27:51.143 回答