Skip to content

Commit 84348ea

Browse files
committed
update sonoar scanner version
1 parent 21da040 commit 84348ea

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

Diff for: .github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
types: [opened, synchronize, reopened]
88
env:
9-
SONAR_SCANNER_VERSION: 4.7.0.2747
9+
SONAR_SCANNER_VERSION: 6.1.0.4477
1010
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1111
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
1212
PARALLEL_THREADS: 2

Diff for: Dockerfile

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM osrf/ros:humble-desktop
22

3-
ARG SONAR_SCANNER_VERSION=4.7.0.2747
3+
ARG SONAR_SCANNER_VERSION=6.1.0.4477
44

55
ARG DEBIAN_FRONTEND=noninteractive
66

@@ -11,23 +11,29 @@ ENV HOME /home/dockerdev
1111
ARG UID=1000
1212

1313
RUN apt-get update && apt-get install --yes \
14+
apt-utils \
1415
build-essential \
1516
pkg-config \
1617
cmake \
1718
doxygen \
1819
check \
1920
clang-format-13 \
2021
libserialport-dev \
21-
ros-humble-gps-msgs \
22-
# Sonar-scanner dependency
23-
openjdk-19-jdk
22+
ros-humble-gps-msgs
2423

2524
# Add a "dockerdev" user with sudo capabilities
2625
# 1000 is the first user ID issued on Ubuntu; might
2726
# be different for Mac users. Might need to add more.
28-
RUN useradd -u ${UID} -ms /bin/bash -G sudo dockerdev && \
29-
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers && \
30-
chown -R dockerdev:dockerdev $HOME/
27+
# Create the user with the specified UID
28+
RUN useradd -u $UID -m dockerdev && \
29+
# Set the user's shell to /bin/bash
30+
chsh -s /bin/bash dockerdev && \
31+
# Add the user to the sudo group
32+
usermod -aG sudo dockerdev && \
33+
# Add the user to sudoers with no password prompt for sudo commands
34+
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
35+
# Change ownership of the home directory to the new user
36+
chown -R dockerdev:dockerdev $HOME
3137

3238
USER dockerdev
3339

@@ -46,10 +52,10 @@ RUN sudo apt-get -y install gcovr
4652
# Download and set up sonar-scanner
4753
RUN sudo apt-get -y install unzip && \
4854
mkdir -p $HOME/.sonar && \
49-
curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux.zip && \
55+
curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}-linux-x64.zip && \
5056
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
5157

52-
ENV PATH="${PATH}:/home/dockerdev/.sonar/sonar-scanner-${SONAR_SCANNER_VERSION}-linux/bin"
58+
ENV PATH="${PATH}:/home/dockerdev/.sonar/sonar-scanner-${SONAR_SCANNER_VERSION}-linux-x64/bin"
5359

5460
WORKDIR /mnt/workspace/src/swiftnav-ros2
5561

Diff for: code_coverage.sh

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
export GITHUB_TOKEN=$1
1313
export SONAR_TOKEN=$2
14-
export JAVA_HOME=/usr/lib/jvm/java-19-openjdk-amd64
15-
export PATH=$JAVA_HOME/bin:$PATH
1614

1715
mkdir -p build
1816
cd build

0 commit comments

Comments
 (0)