Closed joelittlejohn closed 8 years ago
@joelittlejohn That can happen when the bulid doesn't start immediately (e.g. due to executor starvation or slow host).
Try waiting for 5 secs after the build before streaming the console output: nestor build --pending 5000 --console my-job
Or run console command after Jenkins starts building the job: nestor console my-job
Please let me know if either of these work for you.
Hi @cliffano. Both of these solutions do work, thanks.
Via the Jenkins API it's possible to track the build you have invoked to find out if it has started yet (looks for the 'executable' property). When nestor is invoked with --console
we should poll the job until the build starts and stream the correct console output I think.
@joelittlejohn Thanks for confirmation. I'm going to close this issue off.
I see that you forked the repo, so I'm looking forward to the contribution for the support to wait for the build to start before streaming the console output.
Thanks for pointing out the 'executable' property, I must've missed that when I first implemented the feature.
Fixed by #39
When I trigger a build like this:
I expect that the console output of the new build will be streamed to my terminal, however nestor prints the console output from the previous build and exits.
Jenkins version is 2.10