I am trying to copy the artifacts from one build (Coverity Test
), to another build (MainBuild
).
MainBuild
uses a declarative pipeline. I have added the following step to build Coverity Test
as the final step in MainBuild
.
stage('Coverity Test') {
when { expression { params.CoverityReport ==true } }
steps{
build job: 'Coverity Test',
parameters: [
string(name: 'COVERITY_TOOL_HOME',
value: '/home/coverity/cov-analysis-linux64-2020.03'),
string(name: 'GIT_BRANCH', value: "${env.PROJ_GIT_BRANCH}")
]
copyArtifacts filter: 'CoverityCrit*Issues.txt', fingerprintArtifacts: true, projectName: 'Coverity Test', selector: specific ('${BUILD_NUMBER}')
}
}
The files CoverityCrit*Issues are created in a script through the Coverity Test build, I have confirmed that these files display as artifacts of the Coverity Test in Jenkins.
The copyArtifacts
command returns an error "ERROR: Unable to find a build for artifact copy from: Coverity Test"
I used this as an example to create the copyArtifacts command
What am I doing wrong?