bitbucket pipeline with docker, how to add source dependencies from a git repo
Well, let me share with you my approach on that. I use GitLab CI, which I guess it might be similar.
In my repository, I have a rosinstall file including the packages that I need to build from source.
In my case, coscr.rosinstall looks like
- git: local-name: ira_laser_tools uri: https://github.com/iralabdisco/ira_laser_tools.git version: master
Then in my .gitlab-ci.yml file, I handle it like that:
stages: - build - testimage: osrf/ros:melodic-desktop-fullbefore_script: - apt-get update && apt-get upgrade -y - apt-get install -y python-rosinstall python-rosinstall-generator python-wstool build-essential - apt-get install -y alsa-utils - apt-get clean - mkdir -p ~/catkin_ws/srcbuild: stage: build script: - cd ~/catkin_ws/src - git clone https://gitlab.com/______/cs_monster.git - cd ~/catkin_ws - wstool init src src/cs_monster/coscr.rosinstall - rosdep install --from-paths src --ignore-src -r -y - catkin_make -DCMAKE_BUILD_TYPE=Release
You can see how I use rosdep to make the trick.As far as I remember it was working. Either way, I hope it can give you some hints.