Example of gitlab-ci settings for ROS project

Once i wrote about problems with setting gitlab-ci based on gitlab-runner, and i did not show final successful settings.

Here they are:

# cat config.toml
concurrent = 1
check_interval = 0

[[runners]]
  name = "ci_runner"
  url = "http://HOST.ru"
  token = "TOKEN"
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "test_env:latest"
    privileged = true
    disable_cache = false
    volumes = ["/var/run/docker.sock:/var/run/docker.sock", "/cache"]
    shm_size = 0
    extra_hosts = ["HOST.ru:IP"]
    pull_policy = "if-not-present"
  [runners.cache]

Dockerfile:

# cat Dockerfile
FROM ros:kinetic-ros-base-xenial
RUN apt-get update && apt-get install -y --no-install-recommends \
		ros-kinetic-ros-control \
		ros-kinetic-ros-controllers \
		ros-kinetic-gazebo-ros \
		ros-kinetic-gazebo-ros-control \
		libeigen3-dev \
	&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
		python-scipy \
		python-matplotlib \
		python-tk \
	&& rm -rf /var/lib/apt/lists/*
# configure environment
RUN mkdir -p /home/catkin_ws/src

And .gitlab-ci.yml:

PROJECT_test:
  stage: build
  script:
    - mv /builds/GROUP/PROJECT /home/catkin_ws/src
    - mkdir /builds/GROUP/PROJECT
    - cd /home/catkin_ws
    - catkin_make
    - source /home/catkin_ws/devel/setup.bash
    - PYTHONPATH=$PYTHONPATH:/home/catkin_ws/src/PROJECT
    - echo $ROS_PACKAGE_PATH
    - echo $PYTHONPATH
    - cd /home/catkin_ws/src/PROJECT
    - ./run_all_tests.sh

Where the script run_all_tests.sh is:

set -e
python -m unittest discover -p '*_test.py'
rostest PROJECT_kinematics ik_fk_test.launch

4
Add comment

avatar
3 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
l1vaTester Recent comment authors
newest oldest most voted
Tester
Guest
Tester

Hi where do all these files get placed? Thank you