diff --git a/.github/workflows/java-continuous-integration.yml b/.github/workflows/java-continuous-integration.yml index 1d729934..d998615c 100644 --- a/.github/workflows/java-continuous-integration.yml +++ b/.github/workflows/java-continuous-integration.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - java: [ '8', '11' ] + java: [ '11' ] name: Java ${{ matrix.Java }} CI steps: - name: Check out repository code @@ -43,7 +43,7 @@ jobs: run: mvn -B clean package - name: Test cnes-report env: - SONARQUBE_VERSION: 8.9-community + SONARQUBE_VERSION: 9.9-community run: | version=$(cat pom.xml | grep ".*" | head -1 |awk -F'[><]' '{print $3}'); echo "Starting docker"; diff --git a/README.md b/README.md index 655c0448..e3d29e12 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ This tool can be used in standalone as a JAR executable (with the command line) - Run an analysis with sonar-scanner, maven, gradle, msbuild, etc. - Execute cnesreport: - In standalone, thanks to command line + - Give your jar read permissions for others (chmod o+r `myfile.jar`) - In plugin mode, copy jar in `/opt/sonarqube/extensions/plugins`, restart sonarqube, then click on "More" > "CNES Report". #### Installation @@ -23,7 +24,7 @@ This tool can be used in standalone as a JAR executable (with the command line) **cnesreport** does not need any installation. It is a portable Java application you can copy and run according to following examples. The only requirement is an **up-to-date JRE (>=1.8)**. ##### Plugin mode (Since 2.2.0) -- Copy the sonar-cnes-report.jar in the plugin folder of sonarqube (On linux path should be like `/opt/sonarqube/extensions/plugins`) +- Copy the sonar-cnes-report.jar with read rights for others in the plugin folder of sonarqube (On linux path should be like `/opt/sonarqube/extensions/plugins`) - Restart sonarqube (On linux: `sudo service sonar restart`) #### Get help @@ -71,7 +72,7 @@ java -jar sonar-cnes-report.jar -p projectId If you have installed cnes-report in your sonarqube: open web interface, click on "CNES Report" then choose a project. ##### Advanced usage (standalone) -If you are using a secured instance of SonarQube, you can provide a SonarQube authentication token thanks to `-t` option and specify the url of the SonarQube instance with `-s`. The internal template for the text report can be replaced by the one given through `-r` option. +If you are using a secured instance of SonarQube, you can provide a SonarQube user token (https://docs.sonarqube.org/latest/user-guide/user-account/generating-and-using-tokens/) thanks to `-t` option and specify the url of the SonarQube instance with `-s`. The internal template for the text report can be replaced by the one given through `-r` option. ```` java -jar sonar-cnes-report.jar -t xuixg5hub345xbefu -s https://example.org:9000 -p projectId -r ./template.docx ```` @@ -115,30 +116,43 @@ For legacy versions, check the wiki page here : [Note on legacy versions](https: - - - - - - + + + + + + + - + + - + + + + + + + + + + + +
cnesreport
\
SonarQube
3.0.x
Standalone + Plugin
3.1.0
Standalone + Plugin
3.2.x
Standalone + Plugin
3.3.x
Standalone + Plugin
4.0.0
Standalone + Plugin
4.1.x
Standalone + Plugin
3.0.x
Standalone + Plugin
3.1.0
Standalone + Plugin
3.2.x
Standalone + Plugin
3.3.x
Standalone + Plugin
4.0.0
Standalone + Plugin
4.1.x
Standalone + Plugin
4.2.x
Standalone + Plugin
7.9.x (former LTS)7.9.x X X X X - --
8.9.x (LTS)8.9.x - - - - X X-
9.9.x (LTS)------X
diff --git a/package.json b/package.json index 2b89f22a..c71b6c1b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sonar-cnes-report-plugin", "license": "GPL-3.0", - "version": "4.1.2", + "version": "4.2.0", "devDependencies": { "@babel/core": "^7.8.7", "@babel/plugin-proposal-class-properties": "^7.8.3", diff --git a/pom.xml b/pom.xml index 08eb8968..9d038b1d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ fr.cnes.sonar cnesreport - 4.1.3 + 4.2.0 sonar-plugin SonarQube CNES Report @@ -29,13 +29,15 @@ UTF-8 - 1.8 - 1.8 - 1.8 - 4.13.2 - 0.8.7 - 8.9.0.43852 - 1.20.0.405 + 11 + 11 + 11 + 5.9.2 + 0.8.8 + 9.8.0.203 + 9.5.0.56709 + 9.9.0.65466 + 1.21.0.505 cnesreport https://github.com/cnescatlab/sonar-cnes-report CNES @@ -67,6 +69,10 @@ louisjdmartin Louis Martin + + rodrigd + Diego Rodriguez + ErwanGauduchon Erwan Gauduchon @@ -77,7 +83,7 @@ org.apache.commons commons-csv - 1.8 + 1.10.0 compile @@ -87,7 +93,7 @@ compile - org.sonarsource.sonarqube + org.sonarsource.api.plugin sonar-plugin-api ${sonar.apiVersion} provided @@ -95,19 +101,19 @@ org.sonarsource.sonarqube sonar-ws - ${sonar.apiVersion} + ${sonar.Version} compile org.sonarsource.sonarqube sonar-core - ${sonar.apiVersion} + ${sonar.Version} org.apache.httpcomponents httpclient - 4.5.13 + 4.5.14 compile @@ -147,13 +153,13 @@ com.google.guava guava - 30.1.1-jre + 31.1-jre com.google.code.gson gson - 2.8.9 + 2.10.1 compile @@ -185,15 +191,20 @@ org.sonarsource.sonarqube sonar-testing-harness - ${sonar.apiVersion} + ${sonar.testingHarnessVersion} test org.junit.jupiter junit-jupiter-api - 5.7.2 + ${junit.version} test + + org.junit.vintage + junit-vintage-engine + ${junit.version} + com.github.stefanbirkner system-rules @@ -203,7 +214,7 @@ org.mockito mockito-core - 3.12.4 + 5.1.1 test @@ -234,7 +245,7 @@ maven-shade-plugin - 3.2.4 + 3.4.1 package @@ -268,7 +279,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.10.1 ${jdk.min.version} ${jdk.min.version} @@ -276,24 +287,23 @@ - - org.codehaus.mojo - native2ascii-maven-plugin - 1.0-beta-1 - - - - - native2ascii - - - - + + org.codehaus.mojo + native2ascii-maven-plugin + 2.0.1 + + + + resources + + + + org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.2 + 3.4.2 false @@ -302,14 +312,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M5 - - - org.apache.maven.surefire - surefire-junit47 - 3.0.0-M5 - - + 3.0.0-M8 @@ -349,7 +352,7 @@ com.github.eirslett frontend-maven-plugin - 1.11.3 + 1.9.1 generate-resources @@ -358,8 +361,8 @@ install-node-and-yarn - v14.16.1 - v1.22.10 + v16.14.0 + v1.22.5 diff --git a/src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java b/src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java index 3c33a764..9f421d7d 100644 --- a/src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java +++ b/src/main/java/fr/cnes/sonar/report/factory/ServerFactory.java @@ -32,7 +32,7 @@ public class ServerFactory { /** List of SonarQube versions which are supported by cnesreport. */ private static final List SUPPORTED_VERSIONS = Arrays.asList( - "8.9", "8.9.*"); + "8.9", "8.9.*", "9.9", "9.9.*"); /** Url of the SonarQube server. */ private String url; diff --git a/src/main/js/common/api.js b/src/main/js/common/api.js index 6182f07d..f163bd77 100644 --- a/src/main/js/common/api.js +++ b/src/main/js/common/api.js @@ -6,7 +6,7 @@ import { getJSON, postJSON, post } from "sonar-request"; // Function used to get current SonarQube Server version export function isCompatible() { - const COMPATIBILITY_PATTERN = /8.9(?:\..*)?(?:-.*)?/; + const COMPATIBILITY_PATTERN = /[8-9]\.9(\.[0-9])*/; return getJSON("/api/system/status").then(response => { return response.version.match(COMPATIBILITY_PATTERN) != null; diff --git a/src/main/js/conf/env.js b/src/main/js/conf/env.js index f64085f2..c300f8d7 100644 --- a/src/main/js/conf/env.js +++ b/src/main/js/conf/env.js @@ -1,7 +1,8 @@ /** * Script taken from https://github.com/SonarSource/sonar-custom-plugin-example - * Used to handle environment variable - */ + * Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be + * injected into the application via DefinePlugin in Webpack configuration. +*/ const REACT_APP = /^REACT_APP_/i; diff --git a/src/test/ut/java/fr/cnes/sonar/report/CommonTest.java b/src/test/ut/java/fr/cnes/sonar/report/CommonTest.java index fe7b7137..17d3e654 100644 --- a/src/test/ut/java/fr/cnes/sonar/report/CommonTest.java +++ b/src/test/ut/java/fr/cnes/sonar/report/CommonTest.java @@ -47,7 +47,7 @@ public abstract class CommonTest { /** * Branch name. */ - protected static final String BRANCH = "master"; + protected static final String BRANCH = "main"; /** * Quality Gate name. */