Details

    • Type: Improvement
    • Status: Reopened (View Workflow)
    • Priority: Trivial
    • Resolution: Unresolved
    • Component/s: workflow-job-plugin
    • Labels:
      None
    • Environment:
      CloudBees Jenkins Enterprise 2.7.19.0.1
    • Similar Issues:

      Description

      Currently the pipeline plugin prints the steps into the console output, prefixed with [Pipeline]

      [Pipeline] node
      Running on Agent1 in C:\Jenkins\workspace\TEST JOB
      [Pipeline] {
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] withCredentials
      [Pipeline] {
      [Pipeline] bat
      [TEST JOB] Running batch script
      [Pipeline] }
      [Pipeline] // withCredentials
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      

      Is it possible to have a flag somewhere to disable this logging, either in the pipeline itself or configurable at a master level. I'd like to remove this extra logging as it adds too much information to our output. Ideally this should read:

      Running on Agent1 in C:\Jenkins\workspace\TEST JOB
      
      [TEST JOB] Running batch script
      

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            I am the developer of this feature. If you are aware of some issues with it, please file in this component and assign to me, with steps to reproduce from scratch if possible.

            Show
            jglick Jesse Glick added a comment - I am the developer of this feature. If you are aware of some issues with it, please file in this component and assign to me, with steps to reproduce from scratch if possible.
            Hide
            reinholdfuereder Reinhold Füreder added a comment -

            OK => I dared to file JENKINS-54904

            Show
            reinholdfuereder Reinhold Füreder added a comment - OK => I dared to file JENKINS-54904
            Hide
            rgodavarthi Ravi Godavarthi added a comment - - edited

            I use scripted pipelines heavily and I think the ability to toggle these lines as an option is really useful, removing a lot of clutter from logs and improving productivity.

            Its nearly impossible to click hide of hundreds of blocks I have in large pipelines and also Blueocean's declarative pipelines is not an option as its not meant for advanced/ complex pipelines and is only for pipeline rookies (simpler, application oriented use-cases)

            Jesse Glick I am an experienced user of scripted pipelines but new to plugin development, let me know how I can help and I'll be happy to spend time on this

            Show
            rgodavarthi Ravi Godavarthi added a comment - - edited I use scripted pipelines heavily and I think the ability to toggle these lines as an option is really useful, removing a lot of clutter from logs and improving productivity. Its nearly impossible to click hide of hundreds of blocks I have in large pipelines and also Blueocean's declarative pipelines is not an option as its not meant for advanced/ complex pipelines and is only for pipeline rookies (simpler, application oriented use-cases) Jesse Glick I am an experienced user of scripted pipelines but new to plugin development, let me know how I can help and I'll be happy to spend time on this
            Hide
            jglick Jesse Glick added a comment -

            Ravi Godavarthi this has little or nothing to do with Scripted vs. Declarative Pipeline syntax. You can use either the “classic” or Blue Ocean UIs to display execution results. (B.O. does impose certain restrictions on the structure of flow graphs which it is able to display; Declarative syntax is designed to only produce graphs which follow those restrictions, though you can do the same from Scripted syntax with a bit of care.)

            At any rate,

            removing a lot of clutter from logs

            is a valid goal.

            new to plugin development, let me know how I can help

            This would be a patch to workflow-job-plugin, probably tested only interactively (mvn hpi:run) since I do not know of a straightforward way to automate it. I would try patching src/main/resources/org/jenkinsci/plugins/workflow/job/console/NewNodeConsoleNote/script.js to offer some sort of button to toggle display of pipeline-new-node spans, ideally persisting this preference in the browser. (It could also be stored in a UserProperty but that would require some more complicated Java plumbing I do not want to go into right now.)

            Show
            jglick Jesse Glick added a comment - Ravi Godavarthi this has little or nothing to do with Scripted vs. Declarative Pipeline syntax. You can use either the “classic” or Blue Ocean UIs to display execution results. (B.O. does impose certain restrictions on the structure of flow graphs which it is able to display; Declarative syntax is designed to only produce graphs which follow those restrictions, though you can do the same from Scripted syntax with a bit of care.) At any rate, removing a lot of clutter from logs is a valid goal. new to plugin development, let me know how I can help This would be a patch to workflow-job-plugin , probably tested only interactively ( mvn hpi:run ) since I do not know of a straightforward way to automate it. I would try patching src/main/resources/org/jenkinsci/plugins/workflow/job/console/NewNodeConsoleNote/script.js to offer some sort of button to toggle display of pipeline-new-node spans, ideally persisting this preference in the browser. (It could also be stored in a UserProperty but that would require some more complicated Java plumbing I do not want to go into right now.)
            Hide
            amidar Amit Dar added a comment - - edited

            Using: Jenkins 2.190.2,

            Simple Theme plugin 0.5.1

            • timestamp are enabled for all pipeline jobs.

             

            after adding the following as extra css in simple theme plugin:

             {{.pipeline-annotated

            { display: none; }

            }}

            and:

             {{.pipeline-new-node

            {     display: none; }

            }}

            I'm still seeing the lines that originally had the pipeline output, but now they only show the time and line number (other plugins I'm using).

            here:

            15:46:34 Started by user Dar Amit
            15:46:34 Running in Durability level: PERFORMANCE_OPTIMIZED
            15:46:34
            15:46:34
            15:46:34
            15:46:34
            15:46:34
            15:46:34
            15:46:34
            15:46:34
            15:46:34
            15:46:34 test first stage
            15:46:34
            15:46:34
            15:46:34 test second stage
            15:46:34
            15:46:34
            15:46:34

             

            when I view the console as plain text, I see:

            [2019-12-12T13:36:20.913Z] Started by user Dar Amit
            [2019-12-12T13:36:20.988Z] Running in Durability level: PERFORMANCE_OPTIMIZED
            [2019-12-12T13:36:22.129Z] [Pipeline] Start of Pipeline
            [2019-12-12T13:36:22.530Z] [Pipeline] parallel
            [2019-12-12T13:36:22.578Z] [Pipeline] { (Branch: firstBranch)
            [2019-12-12T13:36:22.583Z] [Pipeline] { (Branch: secondBranch)
            [2019-12-12T13:36:22.629Z] [Pipeline] stage
            [2019-12-12T13:36:22.664Z] [Pipeline] { (first)
            [2019-12-12T13:36:22.666Z] [Pipeline] stage
            [2019-12-12T13:36:22.670Z] [Pipeline]

            { (second) [2019-12-12T13:36:22.684Z] [Pipeline] echo [2019-12-12T13:36:22.685Z] test first stage [2019-12-12T13:36:22.686Z] [Pipeline] }

            [2019-12-12T13:36:22.694Z] [Pipeline] echo
            [2019-12-12T13:36:22.694Z] test second stage
            [2019-12-12T13:36:22.702Z] [Pipeline] }

             

            Am I missing something here? I thought the whole idea was to remove those lines completely...

            {{}}

            UPDATE: removing the line number plugin and disable the timestamp in the jenkins configuration solved it, but still I would expect the line number and timestamp to show  in the displayed lines (without all the pipeline output clutter).

            Show
            amidar Amit Dar added a comment - - edited Using: Jenkins 2.190.2, Simple Theme plugin 0.5.1 timestamp are enabled for all pipeline jobs.   after adding the following as extra css in simple theme plugin:  {{.pipeline-annotated { display: none; } }} and:  {{.pipeline-new-node {     display: none; } }} I'm still seeing the lines that originally had the pipeline output, but now they only show the time and line number (other plugins I'm using). here: 15:46:34 Started by user Dar Amit 15:46:34 Running in Durability level: PERFORMANCE_OPTIMIZED 15:46:34 15:46:34 15:46:34 15:46:34 15:46:34 15:46:34 15:46:34 15:46:34 15:46:34 15:46:34 test first stage 15:46:34 15:46:34 15:46:34 test second stage 15:46:34 15:46:34 15:46:34   when I view the console as plain text, I see: [2019-12-12T13:36:20.913Z] Started by user Dar Amit [2019-12-12T13:36:20.988Z] Running in Durability level: PERFORMANCE_OPTIMIZED [2019-12-12T13:36:22.129Z] [Pipeline] Start of Pipeline [2019-12-12T13:36:22.530Z] [Pipeline] parallel [2019-12-12T13:36:22.578Z] [Pipeline] { (Branch: firstBranch) [2019-12-12T13:36:22.583Z] [Pipeline] { (Branch: secondBranch) [2019-12-12T13:36:22.629Z] [Pipeline] stage [2019-12-12T13:36:22.664Z] [Pipeline] { (first) [2019-12-12T13:36:22.666Z] [Pipeline] stage [2019-12-12T13:36:22.670Z] [Pipeline] { (second) [2019-12-12T13:36:22.684Z] [Pipeline] echo [2019-12-12T13:36:22.685Z] test first stage [2019-12-12T13:36:22.686Z] [Pipeline] } [2019-12-12T13:36:22.694Z] [Pipeline] echo [2019-12-12T13:36:22.694Z] test second stage [2019-12-12T13:36:22.702Z] [Pipeline] }   Am I missing something here? I thought the whole idea was to remove those lines completely... {{}} UPDATE: removing the line number plugin and disable the timestamp in the jenkins configuration solved it, but still I would expect the line number and timestamp to show  in the displayed lines (without all the pipeline output clutter).

              People

              • Assignee:
                Unassigned
                Reporter:
                cbanbery Callum Banbery
              • Votes:
                10 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated: