1

The Blue Ocean plugin for Jenkins truncates the output of a Terraform plan at around 1700 lines, and shows a button "Show Complete Log" for the full thing.

When I open the full log, Terraform plans that have colors are now turned into special funky characters that make it impossible to read the plans.

I'm looking to increase the amount of lines (or bytes) that can be shown in the nice interface (with colors) to make it easy to read.

Example of special characters:

[2023-03-23T17:48:53.254Z] [0m[1mmodule.mymodule.module.application.module.aws_something.data.file.policy: Reading...[0m[0m
...
[32m+[0m [0m[1m[0meffect[0m[0m    = "Allow"
[2023-03-23T17:48:53.280Z]           [32m+[0m [0m[1m[0mresources[0m[0m = [
[2023-03-23T17:48:53.280Z]               [32m+[0m [0m"arn:aws:sqs:ap-xxxxxxx-2:11212121212:xxxxxxxxxxxxxxxxxxx",
[2023-03-23T17:48:53.280Z]             ]
[2023-03-23T17:48:53.280Z]           [32m+[0m [0m[1m[0msid[0m[0m       = "PermitTopic"

Any help?

1 Answer 1

1

You can configure this with the hudson.consoleTailKB system property (default value is 150), documented on this page. How/where to set system properties depends on how you installed Jenkins and how you start your Jenkins service (for instance, I configure mine by setting the JENKINS_JAVA_OPTIONS variable in /etc/sysconfig/jenkins).

Alternatively - those look like ANSI escape codes to me, so you could try the ansicolor plugin or load your logs into a viewer/editor which speaks ANSI color codes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.