

It's a bit ugly but after a lot of research it seems to be the best workaround to enable AnsiColor to be returned to a Windows Jenkins master from a Windows Jenkins slave. The command sequences may be stripped or be interpreted to generate formatted output (HTML, RTF, TeX or LaTeX). To set and get an environment directly within Jenkins batch build step is another challenge. Ansifilter handles text files containing ANSI terminal escape codes. Else everything after %ansiRed% will be in red. Set ansiGreen=python %cdRootPath%util\ansiGreen.pyĪs you can see, %ansiOff% is also required, to end with coloring (Its simply "\033[0m" printed through python). Register as env var at the level of your global build configuration:.

Create a helper script in util/ansiGreen.py like so:.Here's how I worked around it to make it colorful. Note: The EPEL field is always displayed for packages in the rpms namespace regardless of whether it is used in bugzilla or not. The build jobs which use Python for console output had no problem with AnsiColor, so if Python is available in your environment where the console output is generated by a script, you can inject ANSI codes from there. These two fields allow to specify a different default assignee for ticket opened against this package in bugzilla.

more info here: and !topic/jenkinsci-users/0OcjlZQfqrkĪ solution: Use Python print for text coloring Last line: To inject an ESC character in a Firefox testbox form, press alt+27, which is also the escape sequence in most editors. These tests were unsuccessful in Jenkins using Windows Batch build step: echo \e[33m hello \e[0m The OP asked explicitly about using AnsiColor Jenkins Plugin on Windows, so here is my answer:Īs wrote, cmd.exe (which is triggered by Jenkins) is not a terminal emulator, so it won't support ANSI output from batch commands by default.
