Sometimes I find log-lines like these in my Jenkins Job Output:
[|] [/] [-] [\] [|] [/] [-] [\] [|] [/] [-]
I know these lines come from a "Progress Spinner" (https://askubuntu.com/questions/623933/how-to-create-a-rotation-animation-using-shell-script) but they look weird in a plain-text log.
It gets worse, when a tool uses a "command line progress bar" which comes e.g. when pulling a Docker Image or an NPM package - then the log contains real ugly (and unnecessary) log blocks.
...
xtracting [=============> ] 15.2 MB/50.31 MB
xtracting [==============> ] 15.2 MB/50.31 MB
xtracting [===============> ] 15.2 MB/50.31 MB
xtracting [================> ] 15.2 MB/50.31 MB
xtracting [=================> ] 15.2 MB/50.31 MB
----
Is there any Jenkins Plugin existing (like the Ansi-Color Plugin) which either shows the animation or shrinks the output to the final "position" ?
I don't want to use every tool in "quiet" mode just to skip these unnecessary "ascii arts" because a lot of interesting information gets lost then.
This is an interesting subject but I am afraid that there is almost nothing safe you can do to "compress" the output if the tool didn't detect the TTY properly.
Here are the workarounds:
-q
or --silent
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With