Skip to content

Commit

Permalink
Update Sonar Scanner to 6.1.0.447 (#45)
Browse files Browse the repository at this point in the history
Update Sonar Scanner to 6.1.0.447 due to CI failure.
  • Loading branch information
sokhealy authored Jul 22, 2024
1 parent 6f88dc7 commit 12decc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
types: [opened, synchronize, reopened]
env:
SONAR_SCANNER_VERSION: 4.7.0.2747
SONAR_SCANNER_VERSION: 6.1.0.4477
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
PARALLEL_THREADS: 2
Expand Down
20 changes: 14 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM osrf/ros:humble-desktop

ARG SONAR_SCANNER_VERSION=4.7.0.2747
ARG SONAR_SCANNER_VERSION=6.1.0.4477

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -11,6 +11,7 @@ ENV HOME /home/dockerdev
ARG UID=1000

RUN apt-get update && apt-get install --yes \
apt-utils \
build-essential \
pkg-config \
cmake \
Expand All @@ -23,9 +24,16 @@ RUN apt-get update && apt-get install --yes \
# Add a "dockerdev" user with sudo capabilities
# 1000 is the first user ID issued on Ubuntu; might
# be different for Mac users. Might need to add more.
RUN useradd -u ${UID} -ms /bin/bash -G sudo dockerdev && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers && \
chown -R dockerdev:dockerdev $HOME/
# Create the user with the specified UID
RUN useradd -u $UID -m dockerdev && \
# Set the user's shell to /bin/bash
chsh -s /bin/bash dockerdev && \
# Add the user to the sudo group
usermod -aG sudo dockerdev && \
# Add the user to sudoers with no password prompt for sudo commands
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
# Change ownership of the home directory to the new user
chown -R dockerdev:dockerdev $HOME

USER dockerdev

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

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

WORKDIR /mnt/workspace/src/swiftnav-ros2

Expand Down

0 comments on commit 12decc9

Please sign in to comment.