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?
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.
Use CTRL+C to stop Jenkins. It is not recommended to try Script Console examples in a production Jenkins instance.
Log files should be at /var/log/jenkins/jenkins.
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.
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