Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gitlab-runner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Seipel
gitlab-runner
Commits
330b5b80
Commit
330b5b80
authored
9 years ago
by
Douglas Thor
Browse files
Options
Downloads
Patches
Plain Diff
Added "Windows + colored text output on web terminal" info to FAQ
parent
9bd45fd1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/faq/README.md
+21
-0
21 additions, 0 deletions
docs/faq/README.md
with
21 additions
and
0 deletions
docs/faq/README.md
+
21
−
0
View file @
330b5b80
...
@@ -70,3 +70,24 @@ before_script:
...
@@ -70,3 +70,24 @@ before_script:
```
```
Additional info can be found under issue
[
#1025
](
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1025
)
.
Additional info can be found under issue
[
#1025
](
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/1025
)
.
## 9. My gitlab runner is on Windows. How can I get colored ouptut on the web terminal?
**Short answer:**
Make sure that you have the ANSI color codes in your program's output. For the purposes of text formatting, assume that you're
running in a UNIX ANSI terminal emulator (because that's what the webUI's output is).
**Long Answer:**
The web interface for gitlab-ci emulates a UNIX ANSI terminal (at least partially). The
`gitlab-runner`
pipes any output from the build
directly to the web interface. That means that any ANSI color codes that are present will be honored.
Windows' CMD terminal (before Win10 (
[
source
](
http://www.nivot.org/blog/post/2016/02/04/Windows-10-TH2-(v1511
)
-Console-Host-Enhancements)))
does not support ANSI color codes - it uses win32 (
[
`ANSI.SYS`
](
https://en.wikipedia.org/wiki/ANSI.SYS
)
) calls instead which are
**not**
present in
the string to be displayed. When writing cross-platform programs, a developer will typically use ANSI color codes by default and convert
them to win32 calls when running on a Windows system (example:
[
Colorama
](
https://pypi.python.org/pypi/colorama
)
).
If you're program is doing the above, then you need to disable that conversion for the CI builds so that the ANSI codes remain in the string.
See issue
[
#332
](
https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/332
)
for more information.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment