Skip to content

Commit

Permalink
fix(jazzy): correct backward_ros tag and release rc2 (#115)
Browse files Browse the repository at this point in the history
* fix: switch to jazzy and avoid docker warnings

* fix: version of backward_ros

* release: rc2
  • Loading branch information
domire8 authored Jul 29, 2024
1 parent e2e36aa commit 1bf08f0
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build-ws:
strategy:
matrix:
ros2_distro: [ iron, jazzy ]
ros2_distro: [ jazzy ]

name: Build and publish ros2-ws:${{ matrix.ros2_distro }}
uses: ./.github/workflows/reusable-build-push.yml
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/reusable-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ jobs:
BUILD_FLAGS+=(--build-arg BASE_TAG=${BASE_TAG})
VERSION_TAG="v${{ needs.check-version.outputs.version }}"
IMAGE_TAGS="${VERSION_TAG},${VERSION_TAG}-${ROS_DISTRO}","${ROS_DISTRO}"
GIT_TAG="${VERSION_TAG}-${{ inputs.ros_distro}}"
if [[ "${VERSION_TAG}" == *"-"* ]]; then
IMAGE_TAGS="${VERSION_TAG},${VERSION_TAG}-${ROS_DISTRO}"
GIT_TAG=""
else
IMAGE_TAGS="${VERSION_TAG},${VERSION_TAG}-${ROS_DISTRO}","${ROS_DISTRO}"
GIT_TAG="${VERSION_TAG}-${{ inputs.ros_distro}}"
fi
BUILD_FLAGS+=(--build-arg VERSION=${GIT_TAG})
echo "::debug::Using base image tag ${BASE_TAG}"
Expand Down Expand Up @@ -147,6 +152,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Create git tag
if: ${{ needs.metadata.outputs.git_tag }} != ""
uses: aica-technology/.github/.github/actions/[email protected]
with:
tag: ${{ needs.metadata.outputs.git_tag }}
36 changes: 18 additions & 18 deletions ros2_ws/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
ARG BASE_IMAGE=docker.io/library/ros
ARG BASE_TAG=iron
ARG ROS_DISTRO=iron
ARG BASE_TAG=jazzy
ARG ROS_DISTRO=jazzy
ARG VERSION=v0.0.0

FROM ${BASE_IMAGE}:${BASE_TAG} as environment-variables
FROM ${BASE_IMAGE}:${BASE_TAG} AS environment-variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONWARNINGS=ignore:::setuptools.command.install,ignore:::setuptools.command.easy_install,ignore:::pkg_resources
ENV PIP_NO_CACHE_DIR 1
ENV USER ros2
ENV HOME /home/${USER}
ENV ROS2_WORKSPACE /home/${USER}/ros2_ws
ENV COLCON_HOME ${HOME}/.colcon
ENV COLCON_DEFAULTS_FILE ${COLCON_HOME}/defaults.yaml
ENV PIP_NO_CACHE_DIR=1
ENV USER=ros2
ENV HOME=/home/${USER}
ENV ROS2_WORKSPACE=/home/${USER}/ros2_ws
ENV COLCON_HOME=${HOME}/.colcon
ENV COLCON_DEFAULTS_FILE=${COLCON_HOME}/defaults.yaml
ENV COLCON_WORKSPACE=${ROS2_WORKSPACE}
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib


FROM environment-variables as base-dependencies
FROM environment-variables AS base-dependencies

# disable suggested and recommended install
RUN apt-config dump | grep -we Recommends -e Suggests | sed s/1/0/ \
Expand Down Expand Up @@ -56,21 +56,21 @@ RUN ( \
) > /etc/ssh/sshd_config_development \
&& mkdir /run/sshd

FROM base-dependencies as base-user-iron
FROM base-dependencies AS base-user-iron

# create and configure a new user
RUN addgroup --gid 1000 ${USER}
RUN adduser --gecos "ROS2 User" --uid 1000 --gid 1000 ${USER} && yes | passwd ${USER}

FROM base-dependencies as base-user-jazzy
FROM base-dependencies AS base-user-jazzy

# rename existing ubuntu user
RUN usermod -l ${USER} ubuntu
RUN groupmod -n ${USER} ubuntu
RUN usermod -d ${HOME} -m ros2
RUN chfn -f "ROS2 User" ros2

FROM base-user-${ROS_DISTRO} as base-workspace
FROM base-user-${ROS_DISTRO} AS base-workspace

RUN usermod -a -G dialout ${USER}
RUN echo "${USER} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/99_aptget
Expand Down Expand Up @@ -111,7 +111,7 @@ USER root
RUN mkdir -p /root/.ssh/ && ssh-keyscan github.com | tee -a /root/.ssh/known_hosts
RUN echo "session required pam_limits.so" | tee --append /etc/pam.d/common-session > /dev/null

FROM base-workspace as ros2-control-iron
FROM base-workspace AS ros2-control-iron

RUN apt-get update && apt-get install --no-install-recommends -y \
doxygen \
Expand Down Expand Up @@ -145,7 +145,7 @@ WORKDIR ${ROS2_WORKSPACE}
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; colcon build"
RUN rm -rf ./src

FROM base-workspace as ros2-control-jazzy
FROM base-workspace AS ros2-control-jazzy
RUN apt-get update && apt-get install --no-install-recommends -y \
# doxygen \
# librange-v3-dev \
Expand All @@ -161,7 +161,7 @@ RUN git clone -b 4.11.0 --depth 1 https://github.com/ros-controls/ros2_control.g
RUN git clone -b 4.8.0 --depth 1 https://github.com/ros-controls/ros2_controllers.git
# get additional interface dependencies manually
RUN git clone -b 5.1.0 --depth 1 https://github.com/ros-controls/control_msgs.git
RUN git clone -b 1.0.5 --depth 1 https://github.com/pal-robotics/backward_ros.git
RUN git clone -b 1.0.3 --depth 1 https://github.com/pal-robotics/backward_ros.git
RUN git clone -b 4.0.0 --depth 1 https://github.com/ros/diagnostics.git
RUN git clone -b 2.5.0 --depth 1 https://github.com/ros-controls/realtime_tools.git
RUN git clone -b 2.1.0 --depth 1 https://github.com/ros2/rcl_interfaces.git
Expand All @@ -179,9 +179,9 @@ WORKDIR ${ROS2_WORKSPACE}
RUN /bin/bash -c "source /opt/ros/${ROS_DISTRO}/setup.bash; colcon build"
RUN rm -rf ./src

FROM ros2-control-${ROS_DISTRO} as ros2-control
FROM ros2-control-${ROS_DISTRO} AS ros2-control

FROM environment-variables as final
FROM environment-variables AS final
COPY --from=ros2-control / /
RUN rm -rf /home/ubuntu

Expand Down
2 changes: 1 addition & 1 deletion ros2_ws/VERSION.jazzy
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
2.0.0-rc2
4 changes: 2 additions & 2 deletions ros2_ws/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

IMAGE_NAME=ghcr.io/aica-technology/ros2-ws
BASE_TAG=iron
ROS_DISTRO=iron
BASE_TAG=jazzy
ROS_DISTRO=jazzy

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
if [[ ! -f "${SCRIPT_DIR}"/config/sshd_entrypoint.sh ]]; then
Expand Down

0 comments on commit 1bf08f0

Please sign in to comment.