industrial_ci
will build, install and test every package in an isolated manner inside a clean Docker image. In this way, missing dependencies(system and other packages) can be easily spotted and fixed before publishing a package. This eases the deployment of Autoware (or any ROS package).
Running locally instead of on the cloud (travis-ci) speeds up the build time.
Autoware and industrial_ci require two different catkin workspaces.
Requirements:
- Docker installed and working.
- Direct connection to the Internet (No proxy). See below for proxy instructions.
Instructions:
- Install catkin tools:
$ sudo apt-get install python-catkin-tools
. - Clone Autoware (if you don’t have it already):
$ git clone https://github.com/CPFL/Autoware
. (if you wish to test an specific branch change to that branch or use-b
). - Create a directory to hold a new workspace at the same level as Autoware, and subdirectory
src
. (In this examplecatkin_ws
and base dir being home ~).~/$ mkdir -p catkin_ws/src && cd catkin_ws/src
. - Initialize that workspace running
catkin_init_workspace
insidesrc
ofcatkin_ws
.~/catkin_ws/src$ catkin_init_workspace
- Clone
industrial_ci
inside thecatkin_ws/src
.~/catkin_ws/src$ git clone https://github.com/ros-industrial/industrial_ci
. - The directory structure should look as follows:
~
├── Autoware
│ ├── ros
│ │ └── src
│ └── .travis.yml
├── catkin_ws
└── src
└── industrial_ci
- Go to
catkin_ws
and build industrial_ci.~/catkin_ws$ catkin config --install && catkin b industrial_ci && source install/setup.bash
. - Once finished, move to Autoware directory
~/catkin_ws$ cd ~/Autoware
. - Run industrial_ci:
- Using
rosrun industrial_ci run_ci ROS_DISTRO=kinetic ROS_REPO=ros
orrosrun industrial_ci run_ci ROS_DISTRO=indigo ROS_REPO=ros
. This method will manually specify the distribution and repositories sources. ~/Autoware$ rosrun industrial_ci run_travis .
. This will parse the.travis.yml
and run in a similar fashion to travis-ci.
For more detailed info: https://github.com/ros-industrial/industrial_ci/blob/master/doc/index.rst#run-industrial-ci-on-local-host
How to run behind a proxy
Configure your docker to use proxy (from https://stackoverflow.com/questions/26550360/docker-ubuntu-behind-proxy and https://docs.docker.com/config/daemon/systemd/#httphttps-proxy):
Ubuntu 14.04
Edit the file /etc/default/docker
, go to the proxy section, and change the values:
# If you need Docker to use an HTTP proxy, it can also be specified here.
export http_proxy="http://proxy.address:port"
export https_proxy="https://proxy.address:port"
Execute in a terminal sudo service docker restart
.
Ubuntu 16.04
- Create config container directory:
$ sudo mkdir -p /etc/systemd/system/docker.service.d
Create the
http-conf.d
file inside:$ sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
Paste the following text and edit with your proxy values:
[Service]
Environment="HTTP_PROXY=http://proxy.address:port"
Environment="HTTPS_PROXY=https://proxy.address:port"
- Save the file
Modifications to industrial_ci
- Add the following lines in
~/catkin_ws/src/industrial_ci/industrial_ci/src/docker.sh
at line 217:
Original: