Jenkis downstream job fails to find upstream artifacts

前端 未结 3 1650
醉酒成梦
醉酒成梦 2021-02-01 08:21

The setup is used to build and deploy to Adobe AEM.

Master Build job pulls from git repository, builds and packages, run the tests and then fires downstream jobs that sh

3条回答
  •  忘掉有多难
    2021-02-01 09:19

    The solution is about the configuration of the builder.

    The root cause sits on the configuration of the downstream job. Once "Copy from workspace of latest completed build" is chosen for the build to be copied, and the path of artifacts to copy is set to relative path, such as projectname-//.jar,projectname-//.zip then the build succeeds.

    Furthemore, in the parent job configuration, downstream job needs to be allowed to CopyArtifact and Projects to allow copy artifacts field should specify the downstream job.

    Edit: Now I see that you responded in the meantime. Great answer and basically clears up some of the questions I had.

    The one unclear thing about option 1 is that archiving of the files happens after the parent job completes.

    Waiting for the completion of projectname-Deploy
    projectname-Deploy #19 completed. Result was SUCCESS
    Waiting for the completion of projectname-Deploy
    projectname-Deploy #20 completed. Result was SUCCESS
    Build step 'Trigger/call builds on other projects' changed build result to SUCCESS
    Strings match run condition: string 1=[lab2b], string 2=[both]
    Run condition [Strings match] preventing perform for step [BuilderChain]
    Archiving artifacts 
    

    Once I changed the approach to option two it worked for me, but I would like to understand first option as well.

提交回复
热议问题