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}
          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 ]
          Basil Crow made changes -
          Assignee New: Basil Crow [ basil ]
          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: