Page MenuHomePhabricator

operations-puppet-tests-docker console output lacks color
Closed, ResolvedPublic

Description

The Jenkins job lacks color output https://integration.wikimedia.org/ci/job/operations-puppet-tests-docker/lastFailedBuild/console either from rspec or tox . For tox we need to pass:

TOX_TESTENV_PASSENV=PY_COLORS
PY_COLORS=1

For rspec we can use SPEC_OPTS=--color

But most probably neither would work because stdin or stdout are probably not tty though docker is run with:

docker run --rm --tty

Maybe we have to pass to docker:

-i, --interactive=false    Keep STDIN open even if not attached

Event Timeline

From https://groups.google.com/forum/#!topic/docker-user/Bp4BaWRw6k4

No colours:
docker run -v ~/myproject/code -w="/code" -entrypoint="npm"myprojectBuilder install

Pretty colours:
docker run -t -v ~/myproject/code -w="/code" -entrypoint="npm"myprojectBuilder install

-t which we set.

A user state:

Add the environment variable TERM and set it to xterm in your Dockerfile:

ENV TERM=xterm

Dzahn triaged this task as Low priority.Sep 7 2017, 2:32 PM

Change 384033 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] docker: force color in operations-puppet

https://gerrit.wikimedia.org/r/384033

Change 384033 merged by jenkins-bot:
[integration/config@master] docker: force color in operations-puppet

https://gerrit.wikimedia.org/r/384033

Deployed and verified. Both tox and rspec have color output in the Jenkins console \o/