Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58215

Coloring breaks timestamp output in Declarative Pipeline (NOT Blueocean)

      The next timestamp after a coloured line appears with the same color as the line and is not formatted.

      Relevant parts of Jenkinsfile

      pipeline {
          options {
              withAWS(region: 'eu-west-1', roleAccount: acme, credentials: 'acme')
              timeout(time: 20, unit: 'MINUTES')
              timestamps()
              ansiColor('xterm')
          }
      
              stage('Build') {
                  steps {
                      sh '''#!/bin/sh -eux
      
                          docker build --pull --tag "$GIT_COMMIT" .
                      '''
                  }
              }
      }
      
      

          [JENKINS-58215] Coloring breaks timestamp output in Declarative Pipeline (NOT Blueocean)

          Jakub Bochenski created issue -
          Jakub Bochenski made changes -
          Description Original: The next timestamp after a coloured line appears with the same color as the line and is not formatted.

           !Screenshot_20190626_164002.png!

          Relevant parts of Jenkinsfile
          {code}

          pipeline {
              options {
                  withAWS(region: 'eu-west-1', roleAccount: acme, credentials: 'acme')
                  timeout(time: 20, unit: 'MINUTES')
                  timestamps()
                  ansiColor('xterm')
              }

                  stage('Build') {
                      // build goes before tests to force updating the parent image
                      steps {
                          sh '''#!/bin/sh -eux

                              docker build --pull --tag "$GIT_COMMIT" .
                          '''
                      }
                  }
          }

          {code}
          New: The next timestamp after a coloured line appears with the same color as the line and is not formatted.

           !Screenshot_20190626_164002.png!

          Relevant parts of Jenkinsfile
          {code}

          pipeline {
              options {
                  withAWS(region: 'eu-west-1', roleAccount: acme, credentials: 'acme')
                  timeout(time: 20, unit: 'MINUTES')
                  timestamps()
                  ansiColor('xterm')
              }

                  stage('Build') {
                      steps {
                          sh '''#!/bin/sh -eux

                              docker build --pull --tag "$GIT_COMMIT" .
                          '''
                      }
                  }
          }

          {code}

          dnusbaumjglick maybe this is related to the ConsoleAnnotator change?

          Jakub Bochenski added a comment - dnusbaum jglick maybe this is related to the ConsoleAnnotator change?
          Jakub Bochenski made changes -
          Environment New: Jenkins ver. 2.176.1
          Timestamper 1.9
          AnsiColor 0.6.2
          Pipeline: Declarative 1.3.9
          Jesse Glick made changes -
          Assignee Original: Andrew Bayer [ abayer ]

          Jesse Glick added a comment -

          Probably. Maybe due to multiline (unterminated) ANSI sequences? Would be helpful to have a script to reproduce from scratch, e.g. using echo with format.

          Jesse Glick added a comment - Probably. Maybe due to multiline (unterminated) ANSI sequences? Would be helpful to have a script to reproduce from scratch, e.g. using echo with format.

          Basil Crow added a comment -

          I think this is a duplicate of JENKINS-58102, which was fixed in Timestamper 1.10. jbochenski, can you please try 1.10 or later and confirm that the issue is resolved?

          Basil Crow added a comment - I think this is a duplicate of JENKINS-58102 , which was fixed in Timestamper 1.10. jbochenski , can you please try 1.10 or later and confirm that the issue is resolved?
          Basil Crow made changes -
          Assignee New: Basil Crow [ basil ]

          Basil Crow added a comment -

          There have been no further reports of this issue over the past year, so I think it is likely this was fixed in JENKINS-58102. If this issue occurs again with Timestamper 1.10 or later, please open a new issue.

          Basil Crow added a comment - There have been no further reports of this issue over the past year, so I think it is likely this was fixed in JENKINS-58102 . If this issue occurs again with Timestamper 1.10 or later, please open a new issue.
          Basil Crow made changes -
          Link New: This issue duplicates JENKINS-58102 [ JENKINS-58102 ]
          Basil Crow made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            basil Basil Crow
            jbochenski Jakub Bochenski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: