【发布时间】:2017-04-17 06:37:50
【问题描述】:
我有一个 Jenkins 管道作业,它在第一阶段存档一个工件,然后我需要在管道构建的另一个阶段复制该工件
node {
stage 'Stage 1 of build'
// Run tests, if successful archive the artifact
archiveArtifacts artifacts: 'build/test.js', excludes: null
stage 'Stage 2 of build'
// want to copy artifact from stage 1 of the build
step([$class: 'CopyArtifact', filter: 'build/test.js', fingerprintArtifacts: true, flatten: true, projectName: 'echo-develop-js-pipeline', selector: [$class: 'WorkspaceSelector'], target: './client/public/vendor/echo/'])
}
有了这个我得到一个unable to find a build for artifact copy
创建工件时,它会保存在这里:
http://localhost:8181/view/Echo JS Develop/job/echo-develop-js-pipeline/233/artifact/build/test.js
如何从管道作业中访问创建的工件?
【问题讨论】:
标签: jenkins groovy jenkins-pipeline