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 to 6.1.0.447 #45

Merged
merged 3 commits into from
Jul 22, 2024
Merged
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
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
Loading