Flyway: Flyway output not colored in jenkins when using ansiColors plugin

Created on 5 Dec 2019  路  3Comments  路  Source: flyway/flyway

Which version and edition of Flyway are you using?

6.1.0

Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)

Jenkins Flyway Runner plugin

Which database are you using (type & version)?

postgres 11.4 but doesn't really matter

Which operating system are you using?

linux

What did you do?

Running a jenkins build containing a call to flyway wrapped with the ansiColor('xterm') step.

What did you expect to see?

The flyway output colored the same as in a standard terminal

What did you see instead?

Everything in black

From the documentation I quote: "Colors are suppressed if stdout is not associated with a terminal."
Perhaps there should be a configuration parameter to force color encodings.

Command-line fixed feature

All 3 comments

@morl-la We're thinking about adding a new CLI-only option -color= which would accept always, never or auto (the current behaviour, which would be the default if the option is omitted). What do you think?

Sounds like it would allow what I need. Thanks.

Great Success!
image

Was this page helpful?
0 / 5 - 0 ratings