ansicolor-plugin: partial logs not showing colors

follow to #212

repreduces: free style job

#!/bin/bash
set -x
for i in {1..5000}; do  
echo -e $i '\033[0;37;42m[10]\033[0m \033[32m  my letters\033[0m'
done

image

image

image

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 9
  • Comments: 42 (1 by maintainers)

Commits related to this issue

Most upvoted comments

To fix it, you need to go to Settings —> Ansicolor —> Global color map for all builds —> and set it to xterm.

Confirmed with:

AnsiColor: 0.7.5 Jenkins: 2.277.1 Java: 1.8.0b201 OS: CentOS 7.6

But AnsiColor 0.5.3 - works ok.

Issue not fixed, same look on partial logs.

Confirmed with:

  • AnsiColor 0.7.4
  • Jenkins 2.263.2
  • Java 11
  • Amazon Linux 2

This is a really nice plugin. Unfortunately run into this bug. Reproduced with instructions on the README.

Jenkins: 2.346.3 Latest LTS as of this moment AnsiColor: 1.0.2

pipeline {
    agent any
    options {
        timestamps()
        ansiColor('xterm')
    }
    stages {
        stage('Build') {
            steps {
                echo '\033[34mHello\033[0m \033[33mcolorful\033[0m \033[35mworld!\033[0m'
            }
        }
        stage('Test') {
            steps {
                echo 'hello from test step'
            }
        }
        stage('Deploy') {
            steps {
                echo 'hello from deploy step'
            }
        }
    }
}
  1. Stage logs don’t render Ansi Colors ansicolor-1

  2. Console Output menu renders Ansi Colors correctly, only in full log mode or output is not trimmed. Doesn’t render correctly if console output is trimmed. Screenshot not included for buggy case as my example output wasn’t trimmed. ansicolor-2

  3. Build -> Pipeline steps -> Console Output doesn’t render correctly (probably same as number 1). This was really unfortunate, individual step logs are much more useful than whole Console Output. ansicolor-3

This is a shot in the dark but ansicolor-1.0.0 has just been released. It includes fixes for a couple of bugs that might have contributed to this issue as well. I would encourage everyone to try it out and report back the results.

and @tszmytka, this is the screenshot of the output: image