Colorize your Jenkins output

There is a plugin in Jenkins very useful to make your life easier when you need to review the console output after a job execution.

This plugin allow you to see the errors and the entire output with colors(red for errors, green for good results, etc). It’s really useful.

Install the plugin

Firstable we need to install in Jenkins the plugin called AnsiColor:

Go to Manage Jenkins –> Manage Plugins –> Available –> AnsiColor

Install it and then restart Jenkins.

Configure a Job to use the plugin

In my example I will configure a Job which execute a playbook in Ansible.

Go to the job to change some configurations that enables the ability of the plugin to show colors in the output.

Select the Job –> Configure

In General tab, Build Environment section we have to enable Color ANSI Console Output. Leave the other options by default.

Then in Build section where we are invoking our ansible playbooks we have to enable Colorized stdout option after clicking on Advanced… button.

And this is the result after executing a job:


Link:

http://wiki.jenkins-ci.org/display/JENKINS/AnsiColor+Plugin

Compartir:

This article was written by RoberMB

💻OS, ☁️Cloud, 🛡️Cybersecurity, ✈️Traveling #Linux, #Ansible, #AWS, #VMware, #Docker 🏴‍☠️ CEH v10, CPHE 🏴‍☠️ ... Always learning, always enjoying.

Leave a Reply

Your email address will not be published. Required fields are marked *