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:
|
return client.get(getUrl() + "/logText/progressiveText"); |
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.
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.