Hi,
I am trying to build a workflow where one a pipeline job passes its artifacts into another (old style) job in Jenkins that we already have defined.
The freestyle job takes 2 parameters: The project name, and the build number. It then copies the artifacts from "Project" / "Build Number" into its workspace, and does stuff with it.
In my pipeline job, I am first saving my artifacts, and then I am calling my downstream job like this:
build job: 'Publish MyJob', parameters: [string(name: 'PROJECT_NAME', value: "${env.JOB_NAME}"), string(name: 'PROJECT_BUILD_NUMBER', value: "${env.BUILD_NUMBER}")], wait: false
The problem is that it seems that the downstream, freestyle project can't access the artifacts of the currently, still running pipeline job. In my freestyle job, I'm getting this output:
ERROR: Unable to find a build for artifact copy from: Organization/MyJob/master
What is the correct way for a pipeline job to start a downstream job with the artifacts it just built?
Thanks,
Greg