5

Is there a way to turn off command echos in Jenkins Pipeline groovy scripts? The only answers seem to be adding the set +/- for shell commands. I want to do this for all pipeline dsl commands.

I would like to suppress lines like the following, as they clutter up the output log:

    [Pipeline] ansiColor
    [Pipeline] {
    [Pipeline] timestamps
    [Pipeline] {
    [Pipeline] node
    [Pipeline] {
    [Pipeline] stage
Paul Solomon
  • 91
  • 1
  • 4
  • 2
    Possible duplicate of [Echo off in Jenkins Console Output](https://stackoverflow.com/questions/26797219/echo-off-in-jenkins-console-output) – dimwittedanimal Jan 04 '19 at 20:45
  • I looked and it appears it is only for shell commands. I want to turn this off for commands I posted above -- Pipeline DSL commands, such as node, stage, etc. – Paul Solomon Jan 04 '19 at 21:52
  • 2
    even if you will find a way to turn it off (I personally did not) I will strongly argue that you need that, cause in cases of failures there are plenty of cases where you need to know which stage was causing failure – BigGinDaHouse Jan 05 '19 at 09:24
  • 1
    I would typically have my own (cleaner) output for stage demarcations, and similar output. – Paul Solomon Jan 07 '19 at 16:43
  • 1
    These seem to be asking the same, https://stackoverflow.com/questions/36947567/how-to-suppress-source-script-lines-echo-in-jenkins-pipeline-console-output, https://stackoverflow.com/questions/44134277/is-it-possible-to-disable-pipeline-messages-in-jenkins-pipeline-console-output – TT-- Jan 20 '19 at 18:50

0 Answers0