14

I am working on some particular Jenkins pipeline which has many steps included - most of which are written in Groovy - because of that I am seeing many [Pipeline] messages which are totally unimportant and unnecessary for me. Is it possible to suppress those?

I am asking for something similiar as in related question 2. but I would like to supress all [Pipeline] messages - which includes messages like:

[Pipeline] node
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] bat
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline

And more...

Related questions:

  1. How to disable command output in jenkins pipeline build logs
  2. How to suppress source script lines echo in jenkins pipeline console output?
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
vumi
  • 174
  • 2
  • 11
  • 4
    Have you find any solution??? I hate those logs entries! – ivoruJavaBoy Feb 06 '18 at 09:29
  • yes the pipeline logs are still utterly ugly and polluted by irrelevant output! – U.V. Dec 14 '20 at 16:14
  • Well, atleast for now it seems like the only way is to modify CSS using answer by jimtut. Edit to clarify - This can be done by either using additional plugin or with browser extension like it was stated in comments under his answer. – vumi Dec 15 '20 at 17:11

4 Answers4

4

We just fixed this following the CSS-based solution in Suppress Scripted Pipelines Output in Jenkins

It looks like the CSS elements might have changed, since the accepted answer:

.pipeline-annotated {
    display: none;
}

didn't work for me, I had to use the .pipeline-new-node CSS class shown in another answer.

jimtut
  • 2,366
  • 2
  • 16
  • 37
  • Seems like an answer I have been looking for, but before marking it as a solution I've got to test it :) – vumi Feb 26 '19 at 15:25
  • sadly I have still not been able to test this solution. Just by looking at it and the CSS generated within job - it should work fine. Not marking this as an answer tho until I have checked it - I should be able to do this soon. – vumi May 22 '19 at 08:32
  • 1
    thanks for the tip ! unlike other SO answers suggesting to modify Jenkins' CSS with some plugin, I went for the browser extension Stylish (on Chromium) and put the CSS there. That way I can easily toggle it from my browser in case I need to see the full logs. – John Pink Aug 07 '19 at 14:56
1

I've also been looking for a way to reduce the amount of output in my pipeline logs. Until now, the only results I have found focus on putting set +x as the first line of a sh step, but that doesn't really do anything for the pipeline step echoes. I would really love to see a solution that did not rely on editing CSS, but rather on the pipeline code; maybe in the options declarative...

0

One more way by which you can hide script section messages, by placing "@" (without quotes) before any script line that you do not want to print in pipeline

PK_008
  • 1
  • 3
-2

This is a bit old but have a look at the blue ocean plugin. It totally alters the way you view pipelines and you may find that these messages are no longer an issue.

krad
  • 1,321
  • 1
  • 15
  • 12
  • Sadly Blue Ocean doesn't allow for certain operations yet, and "visual layer" is not enough to use it. Rather than that I would want to be able to disable or limit this verbose output. – vumi Oct 05 '17 at 09:53