Open BenjaminHerbert opened 8 years ago
I just found, Jenkins prints nicely colored if you wrap the step in the following:
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
sh 'dgr build'
}
formatter.go
detect if there is a TTY to know If it should use color or not.
This is useful for pure go application but probably not enough for dgr where there is logs inside build run by bash scripts.
A --no-color
argument, propagated to build is needed.
When I run dgr in a Jenkins Pipeline, color codes (presumably) are shown in the log output:
Is there a way to suppress the color codes? This would make the output more readable.
I saw that there is a
useColor bool
in vendor/github.com/n0rad/go-erlog/formatter.go is that supposed to turn off colors in the log?