Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci testing (backport #1994) #1997

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 50 additions & 6 deletions .docker/ci-testing/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,59 @@
# CI image using the ROS testing repository

ARG ROS_DISTRO=rolling
FROM ghcr.io/ros-planning/moveit2:${ROS_DISTRO}-ci
FROM osrf/ros2:testing
LABEL maintainer Robert Haschke [email protected]

# Switch to ros-testing
RUN echo "deb http://packages.ros.org/ros2-testing/ubuntu $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/ros2-latest.list
ENV TERM xterm

# Upgrade packages to ros-shadow-fixed and clean apt-cache within one RUN command
RUN apt-get -qq update && \
apt-get -qq upgrade && \
# Install ROS 2 base packages and build tools
# We are installing ros-<distro>-ros-base here to mimic the behavior of the ros:<distro>-ros-base images.
# This step is split into a separate layer so that we can rely on cached dependencies instead of having
# to install them with every new build. The testing image and packages will only update every couple weeks.
RUN \
# Update apt package list as previous containers clear the cache
apt-get -q update && \
apt-get -q -y upgrade && \
#
# Install base dependencies
apt-get -q install --no-install-recommends -y \
# Some basic requirements
wget git sudo curl \
# Preferred build tools
clang clang-format-14 clang-tidy clang-tools \
ccache \
ros-"$ROS_DISTRO"-ros-base && \
#
# Clear apt-cache to reduce image size
rm -rf /var/lib/apt/lists/*

# Setup (temporary) ROS workspace
WORKDIR /root/ws_moveit

# Copy MoveIt sources from docker context
COPY . src/moveit2

# Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers
RUN \
# Update apt package list as previous containers clear the cache
apt-get -q update && \
apt-get -q -y upgrade && \
#
# Globally disable git security
# https://github.blog/2022-04-12-git-security-vulnerability-announced
git config --global --add safe.directory "*" && \
#
# Fetch all dependencies from moveit2.repos
vcs import src < src/moveit2/moveit2.repos && \
if [ -r src/moveit2/moveit2_"$ROS_DISTRO".repos ] ; then vcs import src < src/moveit2/moveit2_"$ROS_DISTRO".repos ; fi && \
#
# Download all dependencies of MoveIt
rosdep update && \
DEBIAN_FRONTEND=noninteractive \
rosdep install -y --from-paths src --ignore-src --rosdistro "$ROS_DISTRO" --as-root=apt:false && \
# Remove the source code from this container
rm -rf src && \
#
# Clear apt-cache to reduce image size
rm -rf /var/lib/apt/lists/*
1 change: 0 additions & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ jobs:
${{ env.DH_IMAGE }}

ci-testing:
needs: ci
strategy:
fail-fast: false
matrix:
Expand Down