Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to suppress source script lines echo in jenkins pipeline console output?

I am writing a pipeline job in Jenkins which shows the output console of a downstream job in the pipeline console output. The job is working so far but the output is really hard to read due to all the echo lines added to the output by the pipeline job itself.

Started by user [email protected]
[Pipeline] Allocate node : Start
Running on swqa-pr-prod-slave-1 in /srv/jenkins-slave/workspace/UUT Automated Regression - 1.20
[Pipeline] node {
[Pipeline] echo

[Pipeline] echo
/////////////////////////////////////////////////
[Pipeline] echo
                Start Execution                  
[Pipeline] echo
/////////////////////////////////////////////////
[Pipeline] echo

[Pipeline] echo

[Pipeline] [monitor] echo
[monitor] [EnvInject] - Loading node environment variables.
[Pipeline] [monitor] echo
[monitor] Building remotely on swqa-pr-prod-slave-1 (pr-prod-linux-slaves) in workspace /srv/jenkins-slave/workspace/Process Map Components Lock Down - 1.00
[Pipeline] [monitor] echo
[monitor] [EnvInject] - Injecting environment variables from a build step.
[Pipeline] [monitor] echo
[monitor] [EnvInject] - Injecting as environment variables the properties content 
[Pipeline] [monitor] echo
[monitor] componentsLockDownScript=RegressionComponentsLockDown.py
[Pipeline] [monitor] echo
[monitor] modifyProcessMapXmlScript=ModifyXmlDom-1.20.py
[Pipeline] [monitor] echo
[monitor] uutAndNodePropertiesFile=DL380G8PR2-NodeData-(203).properties
[Pipeline] [monitor] echo
[monitor] 
[Pipeline] [monitor] echo
[monitor] [EnvInject] - Variables injected successfully.

Is there an option, configuration, command or anything in the pipeline plugin or in Groovy or in Jenkins to allow me suppress all the extra "echoing" to make the console output more readable?

like image 936
Miguel Leal Rosales Avatar asked Apr 29 '16 21:04

Miguel Leal Rosales


People also ask

How do I hide console output in Jenkins?

You can type set +x before any command to temporary override that behavior. Of course you will need set -x to start showing them again.

How to disable Jenkins script Console?

Use CTRL+C to stop Jenkins. It is not recommended to try Script Console examples in a production Jenkins instance.

Where is Jenkins console output stored?

Log files should be at /var/log/jenkins/jenkins.


1 Answers

What you are really looking for is JENKINS-26124. Apparently you have some kind of workaround for this, but there is a flaw in its implementation, which we cannot see in the question.

like image 59
Jesse Glick Avatar answered Oct 23 '22 13:10

Jesse Glick