Skip to content

Commit 65167df

Browse files
authored
Merge pull request tier4#1617 from tier4/fix/ci-errors
Add workaround for ROS signing key migration problem
2 parents 4f52120 + 76a876b commit 65167df

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed

.github/workflows/BuildAndRun.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ jobs:
3636
runs_on: [ubuntu-22.04, ubuntu-22.04-arm]
3737
cmake_build_type: [RelWithDebInfo, Release] # Debug build type is currently unavailable. @TODO Fix problem and add Debug build.
3838
steps:
39+
# workaround until the fix release in the official ros image
40+
- name: Delete old ros2 apt source
41+
run: |
42+
rm /etc/apt/sources.list.d/ros2-latest.list
43+
rm /usr/share/keyrings/ros2-latest-archive-keyring.gpg
44+
45+
- name: Setup new ros2 apt source
46+
run: |
47+
sudo apt-get update && sudo apt-get install curl
48+
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
49+
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb"
50+
sudo apt install /tmp/ros2-apt-source.deb
51+
3952
- name: Suppress warnings
4053
run: git config --global --add safe.directory '*'
4154

.github/workflows/Release.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ jobs:
3232
outputs:
3333
new_version: ${{ steps.new_version.outputs.new_version }}
3434
steps:
35+
# workaround until the fix release in the official ros image
36+
- name: Delete old ros2 apt source
37+
run: |
38+
rm /etc/apt/sources.list.d/ros2-latest.list
39+
rm /usr/share/keyrings/ros2-latest-archive-keyring.gpg
40+
41+
- name: Setup new ros2 apt source
42+
run: |
43+
sudo apt-get update && sudo apt-get install curl
44+
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
45+
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb"
46+
sudo apt install /tmp/ros2-apt-source.deb
47+
3548
- name: Restore branch
3649
if: github.event.pull_request.merged == true
3750
uses: levonet/action-restore-branch@master

Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@ SHELL ["/bin/bash", "-c"]
44
ENV DEBIAN_FRONTEND=noninteractive
55
ENV DEBCONF_NOWARNINGS=yes
66

7-
# cspell: ignore kisak
7+
# workaround until the fix release in the official ros image
8+
RUN rm /etc/apt/sources.list.d/ros2-latest.list \
9+
&& rm /usr/share/keyrings/ros2-latest-archive-keyring.gpg
10+
RUN apt-get update \
11+
&& apt-get install -y ca-certificates curl
12+
13+
RUN export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') ;\
14+
curl -L -s -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo "$VERSION_CODENAME")_all.deb" \
15+
&& apt-get update \
16+
&& apt-get install -y /tmp/ros2-apt-source.deb \
17+
&& rm -f /tmp/ros2-apt-source.deb
18+
819
RUN --mount=type=cache,id=apt-cache-amd64,target=/var/cache/apt,sharing=locked \
920
--mount=type=cache,id=apt-lib-amd64,target=/var/lib/apt,sharing=locked \
1021
apt-get update && apt-get -y install python3-pip python3-rospkg python3-rosdep software-properties-common ccache && \

Dockerfile.traffic_simulator

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ SHELL ["/bin/bash", "-c"]
44
ENV DEBIAN_FRONTEND=noninteractive
55
ENV DEBCONF_NOWARNINGS=yes
66

7+
# workaround until the fix release in the official ros image
8+
RUN rm /etc/apt/sources.list.d/ros2-latest.list \
9+
&& rm /usr/share/keyrings/ros2-latest-archive-keyring.gpg
10+
RUN apt-get update \
11+
&& apt-get install -y ca-certificates curl
12+
13+
RUN export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}') ;\
14+
curl -L -s -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo "$VERSION_CODENAME")_all.deb" \
15+
&& apt-get update \
16+
&& apt-get install -y /tmp/ros2-apt-source.deb \
17+
&& rm -f /tmp/ros2-apt-source.deb
18+
719
# cspell: ignore kisak
820
RUN --mount=type=cache,id=apt-cache-amd64,target=/var/cache/apt,sharing=locked \
921
--mount=type=cache,id=apt-lib-amd64,target=/var/lib/apt,sharing=locked \

0 commit comments

Comments
 (0)