From a85308af8e7201287f757e9946dfd06d31d2f60b Mon Sep 17 00:00:00 2001 From: Louis MARTIN Date: Fri, 5 Jan 2024 15:00:52 +0100 Subject: [PATCH 1/6] Fix sonar project key --- .github/workflows/java-continuous-integration.yml | 2 +- sonar-project.properties | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/java-continuous-integration.yml b/.github/workflows/java-continuous-integration.yml index d998615c..020a43e8 100644 --- a/.github/workflows/java-continuous-integration.yml +++ b/.github/workflows/java-continuous-integration.yml @@ -122,4 +122,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # SonarCloud access token should be generated from https://sonarcloud.io/account/security/ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.organization=lequal -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN \ No newline at end of file + run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.login=$SONAR_TOKEN \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index 9a770264..47cedee6 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,6 +1,8 @@ -sonar.projectKey=cnesreport -sonar.projectName=cnesreport -sonar.projectVersion=3.3.0 +sonar.projectKey=fr.cnes.sonar:cnesreport +sonar.organization=lequal +sonar.host.url=https://sonarcloud.io +sonar.projectName=SonarQube CNES Report +sonar.projectVersion=4.2.0 sonar.projectDescription=Export SonarQube report for a specific project. sonar.sources=src/main sonar.tests=src/test/ut From d1976a015ae6afafdeb8769d89b931a632e9ab5a Mon Sep 17 00:00:00 2001 From: Louis MARTIN Date: Fri, 5 Jan 2024 15:08:51 +0100 Subject: [PATCH 2/6] Fix sonar settings in pom.xml --- .github/workflows/java-continuous-integration.yml | 4 +++- pom.xml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-continuous-integration.yml b/.github/workflows/java-continuous-integration.yml index 020a43e8..f3b83005 100644 --- a/.github/workflows/java-continuous-integration.yml +++ b/.github/workflows/java-continuous-integration.yml @@ -122,4 +122,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # SonarCloud access token should be generated from https://sonarcloud.io/account/security/ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.login=$SONAR_TOKEN \ No newline at end of file + run: | + echo "${SONAR_TOKEN:0:4}"; + mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.token=$SONAR_TOKEN \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9d038b1d..3e132104 100644 --- a/pom.xml +++ b/pom.xml @@ -33,12 +33,14 @@ 11 11 5.9.2 - 0.8.8 + 0.8.11 9.8.0.203 9.5.0.56709 9.9.0.65466 1.21.0.505 cnesreport + lequal + https://sonarcloud.io https://github.com/cnescatlab/sonar-cnes-report CNES src/main/java From c6ccb1cd738bdcae55d31bd65ceca929793d5e8b Mon Sep 17 00:00:00 2001 From: Louis MARTIN Date: Mon, 8 Jan 2024 15:50:33 +0100 Subject: [PATCH 3/6] Upgrade Java version for scan --- .github/workflows/java-continuous-integration.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/java-continuous-integration.yml b/.github/workflows/java-continuous-integration.yml index f3b83005..a72a45c3 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: [ '11' ] + java: [ '11', '17', '21' ] name: Java ${{ matrix.Java }} CI steps: - name: Check out repository code @@ -97,7 +97,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '11' + java-version: '21' - name: Cache Maven packages uses: actions/cache@v2 with: @@ -122,6 +122,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # SonarCloud access token should be generated from https://sonarcloud.io/account/security/ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - echo "${SONAR_TOKEN:0:4}"; - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.token=$SONAR_TOKEN \ No newline at end of file + run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.token=$SONAR_TOKEN \ No newline at end of file From 13321c9e0cc149f56c95254638cf000ceddf4a30 Mon Sep 17 00:00:00 2001 From: Louis MARTIN Date: Mon, 8 Jan 2024 15:54:47 +0100 Subject: [PATCH 4/6] Use Java 17 for CI --- .github/workflows/java-continuous-integration.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-continuous-integration.yml b/.github/workflows/java-continuous-integration.yml index a72a45c3..9d485073 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: [ '11', '17', '21' ] + java: [ '11', '17' ] name: Java ${{ matrix.Java }} CI steps: - name: Check out repository code @@ -97,7 +97,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'adopt' - java-version: '21' + java-version: '17' - name: Cache Maven packages uses: actions/cache@v2 with: From 7fbb82fe958fbe972c39a43bc7c92b381813a2ff Mon Sep 17 00:00:00 2001 From: Louis MARTIN Date: Mon, 8 Jan 2024 15:57:47 +0100 Subject: [PATCH 5/6] Cleaning sonar-project.properties --- sonar-project.properties | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 47cedee6..781f3dd0 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,8 +1,4 @@ -sonar.projectKey=fr.cnes.sonar:cnesreport -sonar.organization=lequal -sonar.host.url=https://sonarcloud.io -sonar.projectName=SonarQube CNES Report -sonar.projectVersion=4.2.0 +# Other infos (project key, version, sonarcloud url, etc. are set in the pom.xml) sonar.projectDescription=Export SonarQube report for a specific project. sonar.sources=src/main sonar.tests=src/test/ut From f2f11905c1e3270de77fb9c2fe5558deaa542323 Mon Sep 17 00:00:00 2001 From: Louis MARTIN Date: Fri, 12 Jan 2024 10:08:15 +0100 Subject: [PATCH 6/6] Update version in pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3e132104..7a354fbb 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ fr.cnes.sonar cnesreport - 4.2.0 + 4.3.0 sonar-plugin SonarQube CNES Report