ansicolor-plugin
ansicolor-plugin copied to clipboard
Implement rendering ANSI color codes in stage view log output
Test environment
- Jenkins Version: 2.249.1
- AnsiColor Version: 0.7.3
- Operating System running Jenkins:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
Expected behavior
ANSI color codes interpreted in stage view log output.
Actual behavior
ANSI color codes are interpreted in overall build log output, but not within individual stage view log output.
Steps to reproduce the behavior
- Execute a build with the following
Jenkinsfile
; review the staging specific log output
node {
stage('checkout') {
checkout scm
}
stage('cibuild') {
wrap([$class: 'AnsiColorBuildWrapper']) {
sh './scripts/something-that-produces-ansi-color-codes'
}
}
}
Issue checklist
- [x] Jenkins version
- [x] AnsiColor version
- [x] Operating System name and version
- [x] Expected behavior
- [x] Actual behavior
- [x] Steps to reproduce the behavior
I actually have been thinking about this for some time but other things always got in the way. This is a new feature that has simply never been implemented. Thank you for the description and a nice screenshot.
We recently ran into this issue (Jenkins 2.235.1, AnsiColor 0.7.5). One thing that I did notice is that the color rendered just fine when viewing the stage view while the command was executing. The color isn't rendered only when viewing the stage view when the command has completed execution.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi,
I got the same behaviour since i update my jenkins server. Before with jenkins 2.164.3 and ansicolo 0.6.2 it works fine even in individual stage view. But since update, last jenkins version and last ansiColor plugin, we met the same pb as describe here.
I revert to ansicolor v0.6.2 and new build keep colors in stage view.
To fix it, you need to go to Settings ---> Ansicolor ---> Global color map for all builds ---> and set it to xterm.