Skip to content

Commit 1106f07

Browse files
committed
Don't run vcs inside buildkit (#60)
1 parent c60ab97 commit 1106f07

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@
3535
__pycache__/
3636
*.py[cod]
3737
*$py.class
38+
39+
# vcstool workspaces
40+
moveit2/src
41+
space_robots/src

moveit2/Dockerfile

+3-13
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,11 @@ RUN python3 -m pip install -U \
8181
pytest-rerunfailures \
8282
pytest
8383

84-
# Get the MoveIt2 source code
85-
WORKDIR ${HOME_DIR}
86-
RUN sudo git clone https://github.com/ros-planning/moveit2.git -b ${ROSDISTRO} moveit2/src
87-
RUN cd ${MOVEIT2_DIR}/src \
88-
&& sudo git clone https://github.com/ros-planning/moveit2_tutorials.git -b ${ROSDISTRO}
89-
90-
# Update the ownership of the source files (had to use sudo above to work around
91-
# a possible inherited 'insteadof' from the host that forces use of ssh
92-
RUN sudo chown -R ${USERNAME}:${USERNAME} ${MOVEIT2_DIR}
93-
9484
# Get rosinstall_generator
9585
RUN sudo apt-get update -y && sudo apt-get install -y python3-rosinstall-generator
9686

9787
# Generate repos file for moveit2 dependencies, excluding packages from Space ROS core.
88+
WORKDIR ${HOME_DIR}
9889
COPY --chown=${USERNAME}:${USERNAME} moveit2-pkgs.txt /tmp/
9990
COPY --chown=${USERNAME}:${USERNAME} excluded-pkgs.txt /tmp/
10091
RUN rosinstall_generator \
@@ -107,9 +98,8 @@ RUN rosinstall_generator \
10798

10899
# Get the repositories required by MoveIt2, but not included in Space ROS
109100
WORKDIR ${MOVEIT2_DIR}
110-
RUN vcs import src < /tmp/moveit2_generated_pkgs.repos
111-
COPY --chown=${USERNAME}:${USERNAME} moveit2_tutorials.repos /tmp/
112-
RUN vcs import src < /tmp/moveit2_tutorials.repos
101+
RUN mkdir -p src && vcs import src < /tmp/moveit2_generated_pkgs.repos
102+
COPY src src
113103

114104
# Update the ownership of the source files (had to use sudo above to work around
115105
# a possible inherited 'insteadof' from the host that forces use of ssh

moveit2/build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ echo ""
1414
echo "##### Building Space ROS/MoveIt2 Docker Image #####"
1515
echo ""
1616

17+
mkdir -p src
18+
vcs import src < ./moveit2.repos
19+
1720
docker build -t $ORG/$IMAGE:$TAG \
1821
--build-arg VCS_REF="$VCS_REF" \
1922
--build-arg VERSION="$VERSION" .

moveit2/moveit2_tutorials.repos moveit2/moveit2.repos

+4
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ repositories:
1515
type: git
1616
url: https://github.com/PickNikRobotics/rviz_visual_tools.git
1717
version: ros2
18+
moveit2:
19+
type: git
20+
url: https://github.com/ros-planning/moveit2.git
21+
version: humble

space_robots/Dockerfile

-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ RUN wget https://github.com/mongodb/mongo-cxx-driver/releases/download/r3.6.7/mo
7272
RUN tar -xzf mongo-cxx-driver-r3.6.7.tar.gz
7373
RUN cd mongo-cxx-driver-r3.6.7/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local && sudo cmake --build . --target EP_mnmlstc_core && cmake --build . && sudo cmake --build . --target install
7474

75-
# Get the source for the dependencies
76-
# RUN vcs import src < /tmp/demo_generated_pkgs.repos
77-
COPY --chown=${USERNAME}:${USERNAME} demo_manual_pkgs.repos /tmp/
78-
RUN vcs import src < /tmp/demo_manual_pkgs.repos && /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"'
79-
8075
RUN sudo apt-get update -y \
8176
&& /bin/bash -c 'source "${SPACEROS_DIR}/install/setup.bash"' \
8277
&& /bin/bash -c 'source "${MOVEIT2_DIR}/install/setup.bash"' \

space_robots/build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ echo ""
1414
echo "##### Building Space ROS Demo Docker Image #####"
1515
echo ""
1616

17+
mkdir -p src
18+
vcs import src < demo_manual_pkgs.repos
19+
1720
docker build -t $ORG/$IMAGE:$TAG \
1821
--build-arg VCS_REF="$VCS_REF" \
1922
--build-arg VERSION="$VERSION" .

0 commit comments

Comments
 (0)