diff --git a/ros/humble/ubuntu/jammy/Containerfile b/ros/humble/ubuntu/jammy/Containerfile index a0ef6f50..68572d68 100644 --- a/ros/humble/ubuntu/jammy/Containerfile +++ b/ros/humble/ubuntu/jammy/Containerfile @@ -20,6 +20,7 @@ EOF FROM base AS ros-core ARG ROS_PACKAGES_URI +ARG ROSDISTRO_PKGS_SYNC_DATE COPY --from=download /usr/share/keyrings/ros2-latest-archive-keyring.gpg /usr/share/keyrings/ros2-latest-archive-keyring.gpg @@ -43,6 +44,7 @@ RUN echo "deb [ signed-by=/usr/share/keyrings/ros2-latest-archive-keyring.gpg ] ENV LANG=C.UTF-8 ENV LC_ALL=C.UTF-8 +ENV ROSDISTRO_PKGS_SYNC_DATE=$ROSDISTRO_PKGS_SYNC_DATE ENV ROS_DISTRO=humble # install ros2 packages diff --git a/ros/humble/ubuntu/jammy/docker-bake.hcl b/ros/humble/ubuntu/jammy/docker-bake.hcl index 62269318..1e20d539 100644 --- a/ros/humble/ubuntu/jammy/docker-bake.hcl +++ b/ros/humble/ubuntu/jammy/docker-bake.hcl @@ -15,6 +15,7 @@ target "_common" { args = { ROS_PACKAGES_URI = "http://packages.ros.org/ros2/ubuntu" RAW_GITHUBUSERCONTENT_BASE_URL = "https://raw.githubusercontent.com" + ROSDISTRO_PKGS_SYNC_DATE = "${formatdate("YYYY-MM-DD", timestamp())}" } dockerfile = "Containerfile" labels = { diff --git a/ros/humble/ubuntu/jammy/test/controls/ros_humble.rb b/ros/humble/ubuntu/jammy/test/controls/ros_humble.rb index f58ff7ca..193c1cd3 100644 --- a/ros/humble/ubuntu/jammy/test/controls/ros_humble.rb +++ b/ros/humble/ubuntu/jammy/test/controls/ros_humble.rb @@ -9,6 +9,10 @@ its('content') { should eq 'C.UTF-8' } end +describe os_env('ROSDISTRO_PKGS_SYNC_DATE') do + its('content') { should match /^\d{4}-\d{2}-\d{2}$/ } +end + describe file('/usr/share/keyrings/ros2-latest-archive-keyring.gpg') do it { should exist } end