Skip to content

Commit

Permalink
Instructions for running on gitlab (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerjw authored and rhaschke committed Jan 23, 2020
1 parent 556b9f1 commit f243457
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,28 @@ It's also possible to run the script without using docker. To this end, issue th
export ROS_WS=/tmp/ros_ws # define a new ROS workspace location
mkdir $ROS_WS # and create it
.moveit_ci/travis.sh

## Run in Gitlab CI in docker runner

When running in a Gitlab CI with the docker runner we instruct Gitlab CI which docker image we want and set the required enviroment variables. Here is an example `gitlab-ci.yml` file. A couple details to notice are the `sed` command that replaces ssh git remotes with one that uses the `gitlab-ci-token` over https and that you will need to define the enviroment variables for the compiler and how it uses `IN_DOCKER` to let the script know it is already in the docker image:

```yaml
image: moveit/moveit:master-ci
before_script:
- git clone --quiet --depth 1 https://github.com/ros-planning/moveit_ci.git .moveit_ci
- sed -i -r "s/ssh:\/\/git@gitlab\.company\.com:9000/https:\/\/gitlab-ci-token:${CI_JOB_TOKEN}@gitlab\.company\.com/g" ${CI_PROJECT_DIR}/repo_name.rosinstall
- export TRAVIS_BRANCH=$CI_COMMIT_REF_NAME
- export CXX=c++
- export CC=cc
- export ROS_DISTRO=melodic
- export UPSTREAM_WORKSPACE=repo_name.rosinstall
- export IN_DOCKER=1
- export CI_SOURCE_PATH=$PWD
- export ROS_WS=${HOME}/ros_ws
- mkdir $ROS_WS
test:
tags:
- docker-runner
script:
- .moveit_ci/travis.sh
```

0 comments on commit f243457

Please sign in to comment.