title: Jenkins Copy Artifact "Unable to find a build for artifact copy from ..."
body: <p>I am trying to copy the artifacts from one build (<code>Coverity Test</code>), to another build (<code>MainBuild</code>).</p>
  <p><code>MainBuild</code> uses a declarative pipeline. I have added the following step to build <code>Coverity Test</code> as the final step in <code>MainBuild</code>.</p>
  <pre><code>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: &quot;${env.PROJ_GIT_BRANCH}&quot;)
          ]
  
          copyArtifacts filter: 'CoverityCrit*Issues.txt', fingerprintArtifacts: true, projectName: 'Coverity Test', selector: specific ('${BUILD_NUMBER}')
      }        
  }
  </code></pre>
  <p>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.</p>
  <p>The <code>copyArtifacts</code> command returns an error <strong>&quot;ERROR: Unable to find a build for artifact copy from: Coverity Test&quot;</strong></p>
  <p><a href="https://stackoverflow.com/questions/36843215/how-can-i-use-the-jenkins-copy-artifacts-plugin-from-within-the-pipelines-jenki">I used this as an example to create the copyArtifacts command</a></p>
  <p>What am I doing wrong?</p>