@@ -207,9 +207,9 @@ RUN echo "sourcing /opt/ros/${ROS_DISTRO}/setup.bash" \
207207 && source /opt/ros/${ROS_DISTRO}/setup.bash \
208208 && apt-get update --fix-missing \
209209 && rosdep init \
210- && rosdep update
211-
212- # && rosdep fix-permissions
210+ && rosdep update --rosdistro "${ROS_DISTRO}" \
211+ && rosdep fix-permissions \
212+ || exit 1
213213
214214RUN colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml \
215215 && colcon mixin update \
@@ -226,7 +226,8 @@ RUN echo "sourcing /opt/ros/${ROS_DISTRO}/setup.bash" \
226226 --from-path ./src \
227227 --rosdistro ${ROS_DISTRO} \
228228 -y \
229- && colcon version-check
229+ && colcon version-check \
230+ || exit 1
230231
231232ARG TARGETPLATFORM
232233ARG BUILDPLATFORM
@@ -247,7 +248,8 @@ RUN COLCON_FLAGS=() \
247248 && echo -e "COLCON_FLAGS=("${COLCON_FLAGS[*]}")" \
248249 && echo "sourcing /opt/ros/${ROS_DISTRO}/setup.bash" \
249250 && source /opt/ros/${ROS_DISTRO}/setup.bash \
250- && colcon build ${COLCON_FLAGS[@]}
251+ && colcon build ${COLCON_FLAGS[@]} \
252+ || exit 1
251253
252254# ===Remove dustynv entrypoint from .bashrc. ======================================================
253255# Note: Source ROS in the dn_entrypoint.init.bash instead"
@@ -276,7 +278,8 @@ RUN echo "sourcing /opt/ros/${ROS_DISTRO}/setup.bash" \
276278 && echo COLCON_PREFIX_PATH=${COLCON_PREFIX_PATH:?'Build argument needs to be set and non-empty.'} \
277279 && python -c "import rclpy" \
278280 && ros2 pkg list \
279- && colcon --log-level error test-result --all --verbose
281+ && colcon --log-level error test-result --all --verbose \
282+ || exit 1
280283
281284RUN if [[ ${ROS_PKG} =~ "desktop".* ]] && [[ -n $(pip list | grep cv2) ]]; then \
282285 python3 -c "import cv2; print( f'Opencv version: {cv2.__version__}' )" ; \
0 commit comments