Skip to content

Commit

Permalink
Add ROSDISTRO_PKGS_SYNC_DATE environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Nov 24, 2024
1 parent b27feeb commit 4092b1c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ros/humble/ubuntu/jammy/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions ros/humble/ubuntu/jammy/docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 4 additions & 0 deletions ros/humble/ubuntu/jammy/test/controls/ros_humble.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4092b1c

Please sign in to comment.