Skip to content
Draft
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
36 changes: 16 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,18 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- source_tag: focal
target_tag: focal
ros_version: ros
- source_tag: jammy
target_tag: jammy
ros_version: ros2
- source_tag: noble
target_tag: noble
ros_version: ros2
- source_tag: noble
target_tag: noble-testing
ros_version: ros2-testing
name: "ubuntu-${{ matrix.target_tag }}"
platform: [linux/amd64, linux/arm64]
base_image_tag: [focal, jammy, noble]
ros_testing: [false, true]
exclude:
- base_image_tag: focal
ros_testing: true
- base_image_tag: jammy
ros_testing: true
name: "ubuntu-${{ matrix.base_image_tag }}${{ matrix.ros_testing && '-testing' || ''}} ${{ matrix.platform }}"
# always use latest linux worker, as it should not have any impact
# when it comes to building docker images.
runs-on: ubuntu-latest
runs-on: ubuntu-24.04${{ matrix.platform == 'linux/arm64' && '-arm' || '' }}
steps:
-
name: Checkout repository
Expand All @@ -55,19 +50,20 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: "${{ matrix.platform }}"
push: ${{ github.event_name != 'pull_request' }}
build-args: |
BASE_IMAGE_NAME=ubuntu
BASE_IMAGE_TAG=${{ matrix.source_tag }}
BASE_IMAGE_TAG=${{ matrix.base_image_tag }}
VCS_REF=${{ github.sha }}
ROS_DISTRO=none
ROS_VERSION=${{ matrix.ros_version }}
ROS_TESTING=${{ matrix.ros_testing && 'true' || '' }}
tags: |
rostooling/setup-ros-docker:ubuntu-${{ matrix.target_tag }}-latest
ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-ubuntu-${{ matrix.target_tag }}:latest
rostooling/setup-ros-docker:ubuntu-${{ matrix.base_image_tag }}${{ matrix.ros_testing && '-testing' || ''}}-latest
ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-ubuntu-${{ matrix.base_image_tag }}${{ matrix.ros_testing && '-testing' || ''}}:latest

ros_variant:
if: false
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

ARG BASE_IMAGE_TAG

FROM "${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}"

Check warning on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / ubuntu-noble-testing linux/amd64

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG "${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}" results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / ubuntu-jammy linux/amd64

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG "${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}" results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / ubuntu-jammy linux/arm64

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG "${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}" results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / ubuntu-noble-testing linux/arm64

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG "${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}" results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / ubuntu-noble linux/arm64

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG "${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}" results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / ubuntu-focal linux/amd64

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG "${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}" results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 18 in Dockerfile

View workflow job for this annotation

GitHub Actions / ubuntu-focal linux/arm64

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG "${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}" results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

# Commit ID this image is based upon
ARG VCS_REF
Expand All @@ -23,8 +23,8 @@
# The ROS distribution being targeted by this image
ARG ROS_DISTRO

# Override default APT sources, "ros", "ros2, or "ros2-testing"
ARG ROS_VERSION=''
# Use ros testing apt repositories instead of main
ARG ROS_TESTING=''

# Additional APT packages to be installed
#
Expand Down
23 changes: 12 additions & 11 deletions setup-ros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr

RTI_CONNEXT_DDS=""

if [ -z $ROS_VERSION ]; then
ROS_VERSION='ros2'
case ${ROS_DISTRO} in
"noetic")
ROS_VERSION="ros"
;;
*)
RTI_CONNEXT_DDS="rti-connext-dds-6.0.1"
ROS_VERSION="ros2"
;;
esac
ROS_VERSION='ros2'
case ${ROS_DISTRO} in
"noetic")
ROS_VERSION="ros"
;;
*)
RTI_CONNEXT_DDS="rti-connext-dds-6.0.1"
ROS_VERSION="ros2"
;;
esac
if [ "${ROS_TESTING}" = "true" ]; then
ROS_VERSION="${ROS_VERSION}-testing"
fi

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" |\
Expand Down