Fix ANSI color parsing and add specs
What does this MR do and why?
Fix ANSI color parsing for job logs and add specs.
References
- "Bright" background color ANSI escape codes are... (#324896 - closed)
- ✂️ UX Paper Cuts 17.11 → Verify (#512693 - closed)
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Check out this branch
- In the GDK, create a new project and add a
.gitlab-ci.ymlfile. - Add this to the file:
image: busybox:latest
ansi:
stage: build
script:
- echo -e "\e[101m Background bright red,\e[49m now cleared,\e[91m Foreground bright red,\e[39m now cleared."
- printf '\e[101m Background bright red,\e[49m now cleared,\e[91m Foreground bright red,\e[39m now cleared.'
- Run a new pipeline
- Depending on how you run runners on your development setup, either one or both of the script statements will have colored log output, and it will match the "After" screenshot above, with red background ending before
now cleared.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #324896 (closed)

