Copy artifact within a jenkins pipeline

后端 未结 3 767
生来不讨喜
生来不讨喜 2021-02-04 16:42

I have a Jenkins pipeline job that archives an Artifact in its first phase, I then need to copy that Artifact in another stage of the pipeline build

node {
  sta         


        
3条回答
  •  遇见更好的自我
    2021-02-04 17:21

    Figured this one out, so using the var ${BUILD_NUMBER} you can access artifacts un the current pipeline

    step([$class: 'CopyArtifact', filter: 'build/test.js', fingerprintArtifacts: true, flatten: true, projectName: 'echo-develop-js-pipeline', selector: [$class: 'SpecificBuildSelector', buildNumber: '${BUILD_NUMBER}'], target: './client/public/vendor/echo/'])
    

提交回复
热议问题