Skip to content
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
30 changes: 21 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,24 @@ on:
- cron: '0 0 * * *'

jobs:
build_ubuntu_docker_image:
ubuntu_base:
strategy:
fail-fast: false
matrix:
base_image_name: [ubuntu]
base_image_tag: [focal, jammy, noble]
name: "${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}"
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 }}"
# always use latest linux worker, as it should not have any impact
# when it comes to building docker images.
runs-on: ubuntu-latest
Expand Down Expand Up @@ -47,15 +58,16 @@ jobs:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
build-args: |
BASE_IMAGE_NAME=${{ matrix.base_image_name }}
BASE_IMAGE_TAG=${{ matrix.base_image_tag }}
BASE_IMAGE_NAME=ubuntu
BASE_IMAGE_TAG=${{ matrix.source_tag }}
VCS_REF=${{ github.sha }}
ROS_DISTRO=none
ROS_VERSION=${{ matrix.ros_version }}
tags: |
rostooling/setup-ros-docker:${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}-latest
ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-${{ matrix.base_image_name }}-${{ matrix.base_image_tag }}:master
rostooling/setup-ros-docker:ubuntu-${{ matrix.target_tag }}-latest
ghcr.io/ros-tooling/setup-ros-docker/setup-ros-docker-ubuntu-${{ matrix.target_tag }}:latest

build_ubuntu_docker_image_ros:
ros_variant:
strategy:
fail-fast: false
matrix:
Expand Down
3 changes: 3 additions & 0 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-focal

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

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

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

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-ros-humble-ros-base

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-ros-noetic-desktop

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-ros-rolling-desktop

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-ros-noetic-ros-base

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-ros-jazzy-ros-base

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-ros-humble-desktop

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-ros-rolling-ros-base

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-ros-jazzy-desktop

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,6 +23,9 @@
# The ROS distribution being targeted by this image
ARG ROS_DISTRO

# Override default APT sources, "ros", "ros2, or "ros2-testing"
ARG ROS_VERSION=''

# Additional APT packages to be installed
#
# This is used to build Docker images incorporating various ROS, or ROS 2
Expand Down
24 changes: 14 additions & 10 deletions setup-ros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,21 @@ apt-get install --no-install-recommends --quiet --yes tzdata
update-ca-certificates
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

ROS_VERSION="ros"
RTI_CONNEXT_DDS=""
case ${ROS_DISTRO} in
"noetic")
ROS_VERSION="ros"
;;
*)
RTI_CONNEXT_DDS="rti-connext-dds-6.0.1"
ROS_VERSION="ros2"
;;
esac

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
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" |\
tee /etc/apt/sources.list.d/${ROS_VERSION}.list > /dev/null

Expand Down