ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Setting ROSCONSOLE_FORMAT in travis.yml?

asked 2020-05-23 11:24:09 -0500

lucasw gravatar image

updated 2020-11-21 12:20:48 -0500

Travis runs substitutions on dollar signs, so a ROSCONSOLE_FORMAT like the following doesn't propagate properly into the system:

env:
  global:
    - ROSCONSOLE_FORMAT=[${severity}] ${time} ${file}:${line} ${node}: ${message}

It also needs to get put into Docker container/s that travis runs, in commands like

- docker exec ... -e ROSCONSOLE_FORMAT=${ROSCONSOLE_FORMAT} ... ${DOCKER_IMAGE_REPO}:${DOCKER_IMAGE_TAG}

I'll cross post this to an answers site that has travis questions if no one knows here.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2020-05-26 15:55:36 -0500

lucasw gravatar image

updated 2020-05-26 15:57:08 -0500

Single quotes were it as commented above (triple single quotes also work, double quotes do not work, you'll see a lot of [][:]: or similar depending on the exact format string):

- ROSCONSOLE_FORMAT='[${severity}] ${time} ${file}:${line} ${node}: ${message}'

I made an simple example to experiment with:

https://github.com/lucasw/ros_docker/...

edit flag offensive delete link more
1

answered 2020-05-23 13:58:35 -0500

gvdhoorn gravatar image

updated 2020-05-23 14:03:09 -0500

If you don't want whatever is interpreting the YAML to interpret a string, you typically have to quote it. Use single quotes (ie: '). That could make this work.

Quoting ROSCONSOLE_FORMAT is a good idea anyway.

Note: this is not a ROS problem, but more a generic "how do I do this with travis / in YAML?" question.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-05-23 11:24:09 -0500

Seen: 166 times

Last updated: May 26 '20