milanaleksic / clici

Terminal overview of Jenkins build jobs
2 stars 0 forks source link

Show console output of a build #9

Closed milanaleksic closed 8 years ago

milanaleksic commented 8 years ago

URL:

http://<jenkins>/job/<jobname>/<executionid>/logText/progressiveText?start=<numberOfBytesFetched>
milanaleksic commented 8 years ago

You can get the amount of data and start reading from some OK location via:

milan@milan-basware ~/temp → curl -I http://<jenkins>/job/<jobName>/4011/logText/progressiveHtml
HTTP/1.1 200 OK
Date: Thu, 22 Sep 2016 07:07:29 GMT
Server: Jetty(winstone-2.9)
X-Text-Size: 6926694    <------ THIS!
Content-Length: 8406584 <------ NOT NOT NOT THIS

and then use X-Text-Size to know from where to fetch (for example last 5 bytes = 6926694-5+1=6926690):

curl http://<jenkins>/job/<jobName>/4011/logText/progressiveHtml?start=6926690