jenkinsjenkins-pipeline

Suppress Scripted Pipelines Output in Jenkins


I'm relatively new to Jenkins and was wondering if there are any examples on suppressing scripted pipelines output in Jenkins.

I see this issue on jenkins website, but I'm not exactly sure how to implement.

I also didn't see a clear answer from a question on Stack Overflow about this issue.

I basically want to get rid of all the Pipeline stuff:

$ docker top 5f4682c000c81cbede8dc72f190b25254e049e9607ba008cbad72a78adab56a2 -eo pid,comm
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Check Style)
[Pipeline] ansiColor
[Pipeline] {
[Pipeline] sh
[ppetry_corpsite_apache_user-HHEF3S7EJLFY7ER74K63UO3KKEOJY46P57XF77IGT3LQ76I2UIJQ] Running shell script
+ lintcheck.sh




--------LINT RESULTS--------
********ALL TESTS PASSED*******


[Pipeline] }
[Pipeline] // ansiColor
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Check Syntax)
[Pipeline] ansiColor
[Pipeline] {
[Pipeline] sh
[ppetry_corpsite_apache_user-HHEF3S7EJLFY7ER74K63UO3KKEOJY46P57XF77IGT3LQ76I2UIJQ] Running shell script
+ syntaxcheck.sh




--------SYNTAX RESULTS--------
********ALL TESTS PASSED*******


[Pipeline] }
[Pipeline] // ansiColor
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Generate Puppet Auth Token)
[Pipeline] withCredentials
[Pipeline] {
[Pipeline] ansiColor
[Pipeline] {
[Pipeline] sh
[ppetry_corpsite_apache_user-HHEF3S7EJLFY7ER74K63UO3KKEOJY46P57XF77IGT3LQ76I2UIJQ] Running shell script
+ gentoken.sh
--------GENERATING PUPPET ACCESS TOKEN--------
Token generated successfully.


[Pipeline] }
[Pipeline] // ansiColor
[Pipeline] }
[Pipeline] // withCredentials
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
$ docker stop --time=1 5f4682c000c81cbede8dc72f190b25254e049e9607ba008cbad72a78adab56a2
$ docker rm -f 5f4682c000c81cbede8dc72f190b25254e049e9607ba008cbad72a78adab56a2
[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline

GitHub has been notified of this commit’s build result

Finished: SUCCESS

Solution

  • Prerequisites:

    Go to Manage Jenkins > Configure System > Theme. In Extra CSS field put the following

    .pipeline-annotated {
         display: none; 
    }
    .pipeline-new-node {
          display: none; 
    }
    

    Click save.

    After that you will not see any [Pipeline] logs anymore.