Skip to content

Reduce CI Docker images and revert to nightly build #2348

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

Merged
merged 9 commits into from
Jun 2, 2021
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
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ _steps:
(echo ros_entrypoint && cat) >> lockfile.txt
sha256sum $PWD/lockfile.txt >> lockfile.txt
mv ~/.ccache $CCACHE_DIR
rm -rf $OVERLAY_WS/src
rm -rf $OVERLAY_WS/*
on_checkout: &on_checkout
checkout:
path: src/navigation2
Expand Down Expand Up @@ -437,15 +437,15 @@ _environments:
executors:
debug_exec:
docker:
- image: rosplanning/navigation2:main.debug
- image: rosplanning/navigation2:main
working_directory: /opt/overlay_ws
environment:
<<: *common_environment
CACHE_NONCE: "Debug"
OVERLAY_MIXINS: "debug ccache coverage-gcc"
release_exec:
docker:
- image: rosplanning/navigation2:main.release
- image: rosplanning/navigation2:main
working_directory: /opt/overlay_ws
environment:
<<: *common_environment
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#!/bin/bash
set -ex
rm -rf ../../.dockerignore

export FROM_IMAGE=ros:rolling
export FROM_IMAGE=osrf/ros2:nightly-rmw-nonfree
export FAIL_ON_BUILD_FAILURE=""
export UNDERLAY_MIXINS="release ccache"
export OVERLAY_MIXINS="release ccache"

docker build \
--target builder \
--tag ${IMAGE_NAME} \
--build-arg FROM_IMAGE \
--build-arg FAIL_ON_BUILD_FAILURE \
--build-arg UNDERLAY_MIXINS \
--build-arg OVERLAY_MIXINS \
--file ../../Dockerfile ../../.
16 changes: 0 additions & 16 deletions .dockerhub/debug/hooks/build

This file was deleted.

1 change: 0 additions & 1 deletion .dockerhub/release/Dockerfile

This file was deleted.

21 changes: 13 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# docker build -t nav2:latest \
# --build-arg UNDERLAY_MIXINS \
# --build-arg OVERLAY_MIXINS ./
ARG FROM_IMAGE=ros:rolling
ARG FROM_IMAGE=osrf/ros2:nightly
ARG UNDERLAY_WS=/opt/underlay_ws
ARG OVERLAY_WS=/opt/overlay_ws

Expand Down Expand Up @@ -34,26 +34,29 @@ RUN mkdir -p /tmp/opt && \

# multi-stage for building
FROM $FROM_IMAGE AS builder

# config dependencies install
ARG DEBIAN_FRONTEND=noninteractive
RUN echo '\
APT::Install-Recommends "0";\n\
APT::Install-Suggests "0";\n\
' > /etc/apt/apt.conf.d/01norecommend

# install CI dependencies
ARG RTI_NC_LICENSE_ACCEPTED=yes
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
ccache \
lcov \
python3-pip \
ros-$ROS_DISTRO-rmw-fastrtps-cpp \
ros-$ROS_DISTRO-rmw-connextdds \
ros-$ROS_DISTRO-rmw-cyclonedds-cpp \
&& pip3 install \
git+https://github.com/ruffsl/colcon-cache.git@13c424c3a455ae04d1a4176a54c49a9d20c9dca0 \
git+https://github.com/ruffsl/colcon-cache.git@c1cedadc1ac6131fe825d075526ed4ae8e1b473c \
&& rosdep update \
&& rm -rf /var/lib/apt/lists/*

# install underlay dependencies
ARG UNDERLAY_WS
ENV UNDERLAY_WS $UNDERLAY_WS
WORKDIR $UNDERLAY_WS
COPY --from=cacher /tmp/$UNDERLAY_WS ./
RUN . /opt/ros/$ROS_DISTRO/setup.sh && \
Expand All @@ -79,6 +82,7 @@ RUN . /opt/ros/$ROS_DISTRO/setup.sh && \

# install overlay dependencies
ARG OVERLAY_WS
ENV OVERLAY_WS $OVERLAY_WS
WORKDIR $OVERLAY_WS
COPY --from=cacher /tmp/$OVERLAY_WS ./
RUN . $UNDERLAY_WS/install/setup.sh && \
Expand All @@ -91,6 +95,9 @@ RUN . $UNDERLAY_WS/install/setup.sh && \
--ignore-src \
&& rm -rf /var/lib/apt/lists/*

# multi-stage for testing
FROM builder AS tester

# build overlay source
COPY --from=cacher $OVERLAY_WS ./
ARG OVERLAY_MIXINS="release ccache"
Expand All @@ -102,8 +109,6 @@ RUN . $UNDERLAY_WS/install/setup.sh && \
|| ([ -z "$FAIL_ON_BUILD_FAILURE" ] || exit 1)

# source overlay from entrypoint
ENV UNDERLAY_WS $UNDERLAY_WS
ENV OVERLAY_WS $OVERLAY_WS
RUN sed --in-place \
's|^source .*|source "$OVERLAY_WS/install/setup.bash"|' \
/ros_entrypoint.sh
Expand Down
40 changes: 20 additions & 20 deletions tools/underlay.repos
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
repositories:
# BehaviorTree/BehaviorTree.CPP:
# type: git
# url: https://github.com/BehaviorTree/BehaviorTree.CPP.git
# version: master
# ros/angles:
# type: git
# url: https://github.com/ros/angles.git
# version: ros2
# ros-simulation/gazebo_ros_pkgs:
# type: git
# url: https://github.com/ros-simulation/gazebo_ros_pkgs.git
# version: ros2
# ros-perception/vision_opencv:
# type: git
# url: https://github.com/ros-perception/vision_opencv.git
# version: ros2
# ros/bond_core:
# type: git
# url: https://github.com/ros/bond_core.git
# version: ros2
BehaviorTree/BehaviorTree.CPP:
type: git
url: https://github.com/BehaviorTree/BehaviorTree.CPP.git
version: master
ros/angles:
type: git
url: https://github.com/ros/angles.git
version: ros2
ros-simulation/gazebo_ros_pkgs:
type: git
url: https://github.com/ros-simulation/gazebo_ros_pkgs.git
version: ros2
ros-perception/vision_opencv:
type: git
url: https://github.com/ros-perception/vision_opencv.git
version: ros2
ros/bond_core:
type: git
url: https://github.com/ros/bond_core.git
version: ros2
ompl/ompl:
type: git
url: https://github.com/ompl/ompl.git
Expand Down