-
-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to pull logs while build still in progress #217
Comments
👍 |
It would be great to offer more ways to fetch logs or better if those can be fetched partially for the users of the API..If you like to contribute that would be great idea... |
Awesome. I think we can do this in many ways. Fetching logs asynchronously.
Fetching logs with markers and additional metadata.
Fetching with specifying limit
What would be preferred approach? |
To be honest I have no preferred approach. Start with that one you like most...may be you can offer multiple ways ;-) ? |
build.details().getConsoleOutputText()? |
@doterme As far I remember this is for finished builds when you do not need to deal with the partial console log. |
@wtrocki ,you should get a build number at first,then get the console log in a timer,this is not for finished,it is in real time |
@doterme - Sorry for confusion. In fact I implemented |
What's the preferred way to fetch logs periodically from jenkins?
Most of the clients using response headers to determine if log is complete.
Example here:
https://github.com/silas/node-jenkins/blob/master/lib/build.js#L190
Thanks to that approach logs can be fetched partially. Jenkins also offers another API to retrieve logs using offset.
Java client using simplified endpoint:
java-client-api/jenkins-client/src/main/java/com/offbytwo/jenkins/model/BuildWithDetails.java
Line 358 in 28d9dbf
I would be happy to contribute and build more sophisticated way to retrieve logs, but I just want to know general target for this client, before doing it.
The text was updated successfully, but these errors were encountered: