Add support for xterm background colors in logs

What does this MR do and why?

This change adds support for background colors in the full log viewer.

Changelog: added

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image image

How to reproduce

php's composer makes use of such ansi backgrounds, so given a command composer validate --verbose --ansi with a faulty config, we can see colorful backgrounds.

Detailed local steps

  1. I am using a local shell runner on macos.
  2. Installed composer with brew install composer
  3. Create a composer project by adding two files:

composer.json:

{
    "name": "group/composer-test"
}

.gitlab-ci.yml

stages:
  - build

composer-validate:
  stage: build
  script:
    - composer validate --verbose --ansi
  1. Start my local runner gitlab-runner run
  2. Run a pipeline, open the job log, e.g. http://gdk.test:3000/my-group/my-composer-project/-/jobs/2516
  3. Visit the job log by adding /viewer e.g. http://gdk.test:3000/my-group/my-composer-project/-/jobs/2516/viewer
Edited by Miguel Rincon

Merge request reports

Loading