From f3c74ca263e2bfe32fe8bdcafb35407be189a7c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrich=20Kr=C3=A4mer?= Date: Mon, 3 Jul 2023 16:02:24 +0200 Subject: [PATCH] wip local sonar latest LTS 9 version --- build/package/Dockerfile.sonar | 4 ++-- scripts/run-sonarqube.sh | 2 +- scripts/sonarqube/Dockerfile | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/build/package/Dockerfile.sonar b/build/package/Dockerfile.sonar index 7ab8d108..34daa5f6 100644 --- a/build/package/Dockerfile.sonar +++ b/build/package/Dockerfile.sonar @@ -4,8 +4,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] USER root WORKDIR /usr/src/app -ENV SONAR_SCANNER_VERSION=4.6.2.2472 \ - CNES_REPORT_VERSION=4.0.0 +ENV SONAR_SCANNER_VERSION=4.8.0.2856 \ + CNES_REPORT_VERSION=4.2.0 # Build Go binary. COPY go.mod . diff --git a/scripts/run-sonarqube.sh b/scripts/run-sonarqube.sh index 2ff46c87..38aff2f8 100755 --- a/scripts/run-sonarqube.sh +++ b/scripts/run-sonarqube.sh @@ -38,7 +38,7 @@ if [ "$(uname -m)" = "arm64" ]; then rm -rf docker-sonarqube || true git clone https://github.com/SonarSource/docker-sonarqube cd docker-sonarqube - git checkout refs/tags/9.7.0 # Last available Git tag + git checkout refs/tags/9.9.1 # Last available Git tag cd 9/community docker build -t sonarqube-arm:${SONAR_IMAGE_TAG} . cd "${SCRIPT_DIR}"/sonarqube diff --git a/scripts/sonarqube/Dockerfile b/scripts/sonarqube/Dockerfile index 8e1dee85..0d8540fc 100644 --- a/scripts/sonarqube/Dockerfile +++ b/scripts/sonarqube/Dockerfile @@ -1,6 +1,11 @@ ARG from="" FROM $from +USER root +ENV SQ_CONF_DIR="/opt/sonarqube/conf" +RUN chmod -R ugo+wrX "${SQ_CONF_DIR}" + +USER sonarqube RUN echo "sonar.forceAuthentication=true" >> conf/sonar.properties # Uncomment the following line to see debug output, e.g. in case SonarQube is