-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
timestamper 1.9
ansicolor 0.6.2
pipeline-build-step 2.9
pipeline-github-lib 1.0
pipeline-githubnotify-step 1.0.4
pipeline-graph-analysis 1.10
pipeline-input-step 2.10
pipeline-milestone-step 1.3.1
pipeline-model-api 1.3.9
pipeline-model-declarative-agent 1.1.1
pipeline-model-definition 1.3.9
pipeline-model-extensions 1.3.9
pipeline-rest-api 2.11
pipeline-stage-step 2.3
pipeline-stage-tags-metadata 1.3.9
pipeline-stage-view 2.11
pipeline-utility-steps 2.3.0
workflow-aggregator 2.6
workflow-api 2.35
workflow-basic-steps 2.18
workflow-cps 2.70
workflow-cps-global-lib 2.13
workflow-durable-task-step 2.31
workflow-job 2.32
workflow-multibranch 2.21
workflow-scm-step 2.9
workflow-step-api 2.20
workflow-support 3.3timestamper 1.9 ansicolor 0.6.2 pipeline-build-step 2.9 pipeline-github-lib 1.0 pipeline-githubnotify-step 1.0.4 pipeline-graph-analysis 1.10 pipeline-input-step 2.10 pipeline-milestone-step 1.3.1 pipeline-model-api 1.3.9 pipeline-model-declarative-agent 1.1.1 pipeline-model-definition 1.3.9 pipeline-model-extensions 1.3.9 pipeline-rest-api 2.11 pipeline-stage-step 2.3 pipeline-stage-tags-metadata 1.3.9 pipeline-stage-view 2.11 pipeline-utility-steps 2.3.0 workflow-aggregator 2.6 workflow-api 2.35 workflow-basic-steps 2.18 workflow-cps 2.70 workflow-cps-global-lib 2.13 workflow-durable-task-step 2.31 workflow-job 2.32 workflow-multibranch 2.21 workflow-scm-step 2.9 workflow-step-api 2.20 workflow-support 3.3
-
-
1.10
Steps to reproduce
1. Install timestamper 1.9 and ansicolor 0.6.2.
2. Set the global option to enable timestamps for all Pipeline builds.
3. Create a job with a console log as follows, and view the console in the classic UI.
[2019-06-18T19:59:27.250Z] ^[[32mDone resetting Postgres targets^[[39m [2019-06-18T19:59:27.250Z] ^[[34m# vm.example.com: [2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co: [2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1 [2019-06-18T19:59:27.250Z] ^[[39m [2019-06-18T19:59:27.931Z] ^[[32mHTTP CONNECTION: vm.example.com/resources/json/session^[[39m
Expected results
GlobalAnnotator should mark up the timestamps for all lines as follows:
12:59:27 Done resetting Postgres targets 12:59:27 # vm.example.com: 12:59:27 Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co: 12:59:27 Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1 12:59:27 12:59:27 HTTP CONNECTION: vm.example.com/resources/json/session
Actual results
GlobalAnnotator marks up the first two lines and the and last line, but the three lines in the middle are not annotated:
12:59:27 Done resetting Postgres targets 12:59:27 # vm.example.com: [2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1# dlpx-trunk-84487-target.dlpxdc.co: [2019-06-18T19:59:27.250Z] Could not fetch logs: Error while executing command: "awk 'BEGIN { CAPTURE="Could not fetch logs: Error while executing command: "grep -c "Starting initial_setup_tests.test_developer_reset_system" /var/log/error.log" Exit status: 1" }; CAPTURE==0 { if (lines > 0){print; lines-- }}; /"Starting initial_setup_tests.test_developer_reset_system"/ { CAPTURE--; lines=200}' /var/log/error.log" Exit status: 1 [2019-06-18T19:59:27.250Z] 12:59:27 HTTP CONNECTION: vm.example.com/resources/json/session
Note that the three lines in the middle are part of a multi-line color sequence.
- is duplicated by
-
JENKINS-58215 Coloring breaks timestamp output in Declarative Pipeline (NOT Blueocean)
- Closed
- relates to
-
JENKINS-48344 Log files generated by Jenkins pipeline scripts are bloated
- Resolved
- links to