From 7c71229db7e2f980a0a8bf29fe10601f56fa8492 Mon Sep 17 00:00:00 2001 From: wkoot <3715211+wkoot@users.noreply.github.com> Date: Thu, 23 May 2024 10:27:25 +0200 Subject: [PATCH] Update to SonarQube 10.5.1 (#79) * Update to SonarQube 10.5.1 and update build * Update to latest plugin and profile versions * Update functional tests --- Dockerfile | 4 ++-- docker/docker-compose.ci.yml | 2 -- docker/docker-compose.yml | 2 -- src/config.json | 24 ++++++++++++------------ tests/test_functional.py | 2 +- 5 files changed, 15 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 08a1728..b5cc3c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ ARG IMAGE_NAME=sonarqube -ARG IMAGE_VERSION=10.3.0 +ARG IMAGE_VERSION=10.5.1 ARG IMAGE_EDITION=community FROM $IMAGE_NAME:$IMAGE_VERSION-$IMAGE_EDITION @@ -25,7 +25,7 @@ RUN chmod +x /src/ /src/*.sh && \ /src/install-plugins.sh WORKDIR /opt/sonarqube -RUN chown -R sonarqube:sonarqube . +RUN chown -R sonarqube . USER sonarqube diff --git a/docker/docker-compose.ci.yml b/docker/docker-compose.ci.yml index bad45af..1a346c6 100644 --- a/docker/docker-compose.ci.yml +++ b/docker/docker-compose.ci.yml @@ -1,6 +1,4 @@ --- -version: "3.7" - services: www: build: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index d718ff3..10539c3 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,6 +1,4 @@ --- -version: "3.7" - services: www: build: diff --git a/src/config.json b/src/config.json index 3c38ead..2141c59 100644 --- a/src/config.json +++ b/src/config.json @@ -1,11 +1,11 @@ { "rules_version": 20231222, "plugins": [ - "https://github.com/checkstyle/sonar-checkstyle/releases/download/10.12.5/checkstyle-sonar-plugin-10.12.5.jar", - "https://github.com/dependency-check/dependency-check-sonar-plugin/releases/download/4.0.1/sonar-dependency-check-plugin-4.0.1.jar", + "https://github.com/checkstyle/sonar-checkstyle/releases/download/10.16.0/checkstyle-sonar-plugin-10.16.0.jar", + "https://github.com/dependency-check/dependency-check-sonar-plugin/releases/download/5.0.0/sonar-dependency-check-plugin-5.0.0.jar", "https://github.com/sbaudoin/sonar-ansible/releases/download/v2.5.1/sonar-ansible-plugin-2.5.1.jar", "https://github.com/sbaudoin/sonar-yaml/releases/download/v1.9.1/sonar-yaml-plugin-1.9.1.jar", - "https://github.com/spotbugs/sonar-findbugs/releases/download/4.2.6/sonar-findbugs-plugin-4.2.6.jar", + "https://github.com/spotbugs/sonar-findbugs/releases/download/4.2.9/sonar-findbugs-plugin-4.2.9.jar", "https://github.com/vaulttec/sonar-auth-oidc/releases/download/v2.1.1/sonar-auth-oidc-plugin-2.1.1.jar" ], "profiles": { @@ -16,39 +16,39 @@ }, "cs": { "plugin_name": "csharp-plugin", - "version": "cs-profile-v9.13.0" + "version": "cs-profile-v9.23.2" }, "java": { "plugin_name": "java-plugin", - "version": "java-profile-v7.27.1" + "version": "java-profile-v7.33.0" }, "js": { "plugin_name": "javascript-plugin", - "version": "js-profile-v10.9.0" + "version": "js-profile-v10.13.2" }, "kotlin": { "plugin_name": "kotlin-plugin", - "version": "kotlin-profile-v2.18.0" + "version": "kotlin-profile-v2.20.0" }, "py": { "plugin_name": "python-plugin", - "version": "py-profile-v4.10.0" + "version": "py-profile-v4.17.0" }, "swift": { "plugin_name": "swift-plugin", - "version": "swift-profile-v4.11.0" + "version": "swift-profile-v4.12.0" }, "ts": { "plugin_name": "javascript-plugin", - "version": "ts-profile-v10.9.0" + "version": "js-profile-v10.13.2" }, "vbnet": { "plugin_name": "vbnet-plugin", - "version": "vbnet-profile-v9.13.0" + "version": "vbnet-profile-v9.23.2" }, "web": { "plugin_name": "html-plugin", - "version": "web-profile-v3.11.0" + "version": "web-profile-v3.15.0" } }, "rules": { diff --git a/tests/test_functional.py b/tests/test_functional.py index 4c98500..86c6dac 100644 --- a/tests/test_functional.py +++ b/tests/test_functional.py @@ -62,7 +62,7 @@ def test_project_override_profile(self): def test_type_profile(self): """Check that custom profile rule type activation is applied.""" self.assertIn("types=", self.config_json["rules"]["web"][0]) - overridden_key = "Web:AvoidHtmlCommentCheck" + overridden_key = "Web:ComplexityCheck" self.assertFalse(next(overridden_key in rule_line for rule_line in self.config_json["rules"]["web"])) version_profile = f"ictu-{self.config_json['profiles']['web']['version']}-{self.config_json['rules_version']}"