Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Sonar Scanner version for Improved Compatibility #185

Closed
wants to merge 6 commits into from
Closed
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
1 change: 0 additions & 1 deletion .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- "develop"
- "release/*"

jobs:
dockerhub:
uses: usdot-fhwa-stol/actions/.github/workflows/dockerhub.yml@main
Expand Down
28 changes: 18 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright (C) 2018-2021 LEIDOS.
#
# Copyright (C) 2018-2024 LEIDOS.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
Expand Down Expand Up @@ -37,7 +37,7 @@ LABEL org.label-schema.build-date=${BUILD_DATE}
ENV NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all} \
# Specify which driver libraries/binaries will be mounted inside the container
NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_CAPABILITIES,}graphics

# Avoid interactive prompts during the building of this docker image
ARG DEBIAN_FRONTEND="noninteractive"

Expand Down Expand Up @@ -102,19 +102,24 @@ ARG ROS_DEPS="apt-transport-https \
less \
libboost-python-dev \
libfftw3-dev \
libgeographic-dev \
libgeographic-dev \
libgmock-dev \
libnl-genl-3-dev \
libopenblas-dev \
libpcap-dev \
libpugixml-dev \
lttng-tools \
lttng-modules-dkms \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a specific comment on this code change, but please create a GitHub Issue in the carma-platform repository that we can link this PR to. It would be great if you can include the deprecated warning that we are receiving in that issue as well.

liblttng-ust-dev \
mesa-utils \
nano \
nodejs \
python3-babeltrace \
python3-catkin-pkg \
python3-catkin-tools \
python3-colcon-common-extensions \
python3-future \
python3-lttng \
python3-pip \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason this PR looks like it is adding new packages to be installed in the Dockerfile under ROS_DEPS, but they are already included on the develop branch. Would you mind looking into resolving this, or alternatively starting clean and putting up a new PR?

python3-rosdep \
python3-setuptools \
Expand All @@ -127,6 +132,7 @@ ARG ROS_DEPS="apt-transport-https \
ros-foxy-test-msgs \
ros-foxy-nmea-msgs \
ros-foxy-gps-tools \
ros-foxy-rosbag2-storage-mcap \
ros-noetic-costmap-2d \
ros-noetic-dataspeed-can \
ros-noetic-dbw-mkz \
Expand Down Expand Up @@ -216,15 +222,15 @@ RUN sed -i 's|http://archive.ubuntu.com|http://us.archive.ubuntu.com|g' /etc/apt
SONAR_DIR=/opt/sonarqube && \
# Pull scanner from internet
mkdir $SONAR_DIR && \
curl -o $SONAR_DIR/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.4.0.2170-linux.zip && \
curl -o $SONAR_DIR/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-linux.zip && \
curl -o $SONAR_DIR/build-wrapper.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip && \
# Unzip scanner
unzip $SONAR_DIR/sonar-scanner.zip -d "$SONAR_DIR"/ && \
unzip $SONAR_DIR/build-wrapper.zip -d "$SONAR_DIR"/ && \
# Remove zip files
# Remove zip files
rm $SONAR_DIR/sonar-scanner.zip && \
rm $SONAR_DIR/build-wrapper.zip && \
# Rename files
# Rename files
mv "$SONAR_DIR"/sonar-scanner-* "$SONAR_DIR"/sonar-scanner/ && \
mv "$SONAR_DIR"/build-wrapper-* "$SONAR_DIR"/build-wrapper/ && \
# FIXME: The following symlink will no longer be required once images
Expand Down Expand Up @@ -255,9 +261,11 @@ RUN sed -i 's|http://archive.ubuntu.com|http://us.archive.ubuntu.com|g' /etc/apt
sudo -u carma rosdep --rosdistro noetic install --from-paths /home/carma/.base-image/workspace/src --ignore-src -y && \
sudo -u carma echo "source ~/.base-image/init-env.sh" >> /home/carma/.bashrc && \
sudo -u carma echo "cd /opt/carma" >> /home/carma/.bashrc && \
# Install Java 17
apt-get install -y openjdk-17-jdk && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

USER carma

ENTRYPOINT [ "/home/carma/.base-image/entrypoint.sh" ]
ENTRYPOINT [ "/home/carma/.base-image/entrypoint.sh" ]
Loading