1

I am triggering pipeline2 from pipeline1. Inside jenkinsfile of pipeline1 I have something like the following

build job: 'pipeline2'

But this doesn't post the live logs of pipeline2 in pipeline1. Is there a way to post the live logs of the downstream job in upstream job console?

VishnuM
  • 53
  • 1
  • 8

1 Answers1

1

This can partially be achieved by returning a build object,

buildobj = build job: 'pipeline2'
echo buildobj.rawBuild.log

But this doesn't echo live logs rather prints everything at once after build is executed.

VishnuM
  • 53
  • 1
  • 8
  • We also have an upstream job only printed rawbuild of the downstream job in case of a failure (after the job has run). But, we did not look into this answer https://stackoverflow.com/a/31573477/8195106. Have you tried that? – Unforgettable631 Nov 25 '20 at 11:01