Never mind -- I seem to have found the solution to this:

1)  Set the freestyle project to use instead select the artifacts of "The 
upstream job that triggered this job" 
2)  Set the wait on the build value to false, so that the pipeline build 
does not wait on running the other freestyle build

These together seem to have fixed the problem (though I didn't try them 
individually, maybe I could have gotten away with one or the other...)

Greg

On Monday, August 15, 2016 at 12:11:00 PM UTC-4, Greg Smith wrote:
>
>
> 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
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e7205517-10a3-4fa0-a754-a9fcba7553be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to