Skip to content

Instantly share code, notes, and snippets.

@johncant
Created April 9, 2013 12:51
Show Gist options
  • Save johncant/5345471 to your computer and use it in GitHub Desktop.
Save johncant/5345471 to your computer and use it in GitHub Desktop.
Colourise your jenkins CI output for a Ruby on Rails app
# Put this in your .rspec for verbose and coloured output. Don't include this comment.
--colour --format documentation
# Add --color and a useful output format to your cucumber options
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --color --strict --tags ~@wip"
# Required for coloured Test::Unit output
gem 'turn'
gem 'ansi'
1) Get the ANSIcolor plugin for Jenkins.
2) Restart Jenkins
3) Configure your tests to output colour control characters
4) Enable colourization per job in Jenkins
# Pretend that we're outputting to a terminal
RSpec.configure do |config|
config.tty = true
end
# The following makes Test::Unit output in colour
require 'turn/autorun'
Turn.config.ansi = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment