Skip to content

Commit 267c392

Browse files
committed
Extend matrix to have a noble-testing version
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
1 parent 1e4ac09 commit 267c392

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ jobs:
1515
matrix:
1616
base_image_name: [ubuntu]
1717
base_image_tag: [focal, jammy, noble]
18+
# ros_version: [ros, ros2, ros2-testing]
19+
include:
20+
- base_image_tag: focal
21+
target_tag: focal
22+
ros_version: ros
23+
- base_image_tag: jammy
24+
target_tag: jammy
25+
ros_version: ros2
26+
- base_image_tag: noble
27+
target_tag: noble
28+
ros_version: ros2
29+
- base_image_tag: noble
30+
target_tag: noble-testing
31+
ros_version: ros2-testing
1832
name: "${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}"
1933
# always use latest linux worker, as it should not have any impact
2034
# when it comes to building docker images.
@@ -51,9 +65,10 @@ jobs:
5165
BASE_IMAGE_TAG=${{ matrix.base_image_tag }}
5266
VCS_REF=${{ github.sha }}
5367
ROS_DISTRO=none
68+
ROS_VERSION=${{ matrix.ros_version }}
5469
tags: |
55-
rostooling/setup-ros-docker:${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}-latest
56-
ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}:master
70+
rostooling/setup-ros-docker:${{ matrix.base_image_name }}-${{ matrix.target_tag }}-latest
71+
ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-${{ matrix.base_image_name }}-${{ matrix.target_tag }}:master
5772
5873
build_ubuntu_docker_image_ros:
5974
strategy:

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ ARG VCS_REF
2323
# The ROS distribution being targeted by this image
2424
ARG ROS_DISTRO
2525

26+
# Override default APT sources, "ros", "ros2, or "ros2-testing"
27+
ARG ROS_VERISON=''
28+
2629
# Additional APT packages to be installed
2730
#
2831
# This is used to build Docker images incorporating various ROS, or ROS 2

setup-ros.sh

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,21 @@ apt-get install --no-install-recommends --quiet --yes tzdata
3333
update-ca-certificates
3434
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
3535

36-
ROS_VERSION="ros"
3736
RTI_CONNEXT_DDS=""
38-
case ${ROS_DISTRO} in
39-
"noetic")
40-
ROS_VERSION="ros"
41-
;;
42-
*)
43-
RTI_CONNEXT_DDS="rti-connext-dds-6.0.1"
44-
ROS_VERSION="ros2"
45-
;;
46-
esac
37+
38+
if [ -z $ROS_VERSION ]; then
39+
ROS_VERSION='ros2'
40+
case ${ROS_DISTRO} in
41+
"noetic")
42+
ROS_VERSION="ros"
43+
;;
44+
*)
45+
RTI_CONNEXT_DDS="rti-connext-dds-6.0.1"
46+
ROS_VERSION="ros2"
47+
;;
48+
esac
49+
fi
50+
4751
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/${ROS_VERSION}/ubuntu $(lsb_release -sc) main" |\
4852
tee /etc/apt/sources.list.d/${ROS_VERSION}.list > /dev/null
4953

0 commit comments

Comments
 (0)