From 284cfe548f0bfdcb0f84e2d6a80ceb7ece176241 Mon Sep 17 00:00:00 2001 From: Matteo Mara Date: Wed, 23 Aug 2023 14:50:57 +0200 Subject: [PATCH] SONAR-20071 Update references to JDK 17 and scanner cli version 5.0 in tutorials --- .../azure-pipelines/JavaToolInstallation.tsx | 2 +- .../BitbucketPipelinesTutorial-it.tsx.snap | 12 +++++----- .../bitbucket-pipelines/commands/CFamily.ts | 2 +- .../bitbucket-pipelines/commands/DotNet.ts | 4 ++-- .../bitbucket-pipelines/commands/Gradle.ts | 2 +- .../bitbucket-pipelines/commands/Maven.ts | 2 +- .../bitbucket-pipelines/commands/Others.ts | 2 +- .../GithubActionTutorial-it.tsx.snap | 24 +++++++++---------- .../github-action/commands/CFamily.tsx | 12 +++++----- .../github-action/commands/DotNet.tsx | 4 ++-- .../github-action/commands/Gradle.tsx | 4 ++-- .../github-action/commands/JavaMaven.tsx | 4 ++-- .../GitLabCITutorial-it.tsx.snap | 8 +++---- .../gitlabci/commands/PipeCommand.tsx | 8 +++---- .../__snapshots__/OtherTutorial-it.tsx.snap | 12 +++++----- .../other/commands/DownloadScanner.tsx | 4 ++-- 16 files changed, 53 insertions(+), 53 deletions(-) diff --git a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx index a70e1f2a787..e00a2b835e4 100644 --- a/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/azure-pipelines/JavaToolInstallation.tsx @@ -51,7 +51,7 @@ export default function JavaToolInstallation() { field: translate( 'onboarding.tutorial.with.azure_pipelines.BranchAnalysis.java_installer.java_version' ), - value: '11', + value: '17', })} {' ' /* explicit space between the two strings */} {translate( diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/BitbucketPipelinesTutorial-it.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/BitbucketPipelinesTutorial-it.tsx.snap index 7a72fc4ec55..80771e51eee 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/BitbucketPipelinesTutorial-it.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/BitbucketPipelinesTutorial-it.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should follow and complete all steps: .NET: bitbucket-pipelines.yml 1`] = ` -"image: mcr.microsoft.com/dotnet/core/sdk:latest +"image: mcr.microsoft.com/dotnet/sdk:7.0 definitions: steps: @@ -12,7 +12,7 @@ definitions: - sonar script: - apt-get update - - apt-get install --yes openjdk-11-jre + - apt-get install --yes --no-install-recommends openjdk-17-jre - dotnet tool install --global dotnet-sonarscanner - export PATH="$PATH:/root/.dotnet/tools" - dotnet sonarscanner begin /k:"my-project" /d:"sonar.token=\${SONAR_TOKEN}" /d:"sonar.host.url=\${SONAR_HOST_URL}" @@ -39,7 +39,7 @@ definitions: - step: &build-step name: Build the project, and run the SonarQube analysis script: - - export SONAR_SCANNER_VERSION=4.6.2.2472 + - export SONAR_SCANNER_VERSION=5.0.1.3006 - mkdir $HOME/.sonar - curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip - unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ @@ -68,7 +68,7 @@ pipelines: exports[`should follow and complete all steps: CFamily: sonar-project.properties 1`] = `"sonar.projectKey=my-project"`; exports[`should follow and complete all steps: Gradle: bitbucket-pipelines.yml 1`] = ` -"image: openjdk:8 +"image: eclipse-temurin:17 definitions: steps: @@ -122,7 +122,7 @@ sonar { `; exports[`should follow and complete all steps: Maven: bitbucket-pipelines.yml 1`] = ` -"image: maven:3-openjdk-11 +"image: maven:3-eclipse-temurin-17 definitions: steps: @@ -157,7 +157,7 @@ definitions: - step: &build-step name: SonarQube analysis script: - - pipe: sonarsource/sonarqube-scan:1.0.0 + - pipe: sonarsource/sonarqube-scan:2.0.1 variables: SONAR_HOST_URL: \${SONAR_HOST_URL} # Get the value from the repository/workspace variable. SONAR_TOKEN: \${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here. diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts index b8a62d6fb84..94b6d4e3d16 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts @@ -25,7 +25,7 @@ definitions: - step: &build-step name: Build the project, and run the SonarQube analysis script: - - export SONAR_SCANNER_VERSION=4.6.2.2472 + - export SONAR_SCANNER_VERSION=5.0.1.3006 - mkdir $HOME/.sonar - curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip - unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts index 3b6e17fafe2..07d88a53f5b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/DotNet.ts @@ -22,7 +22,7 @@ export default function dotNetExample( mainBranchName: string, projectKey: string ) { - return `image: mcr.microsoft.com/dotnet/core/sdk:latest + return `image: mcr.microsoft.com/dotnet/sdk:7.0 definitions: steps: @@ -33,7 +33,7 @@ definitions: - sonar script: - apt-get update - - apt-get install --yes openjdk-11-jre + - apt-get install --yes --no-install-recommends openjdk-17-jre - dotnet tool install --global dotnet-sonarscanner - export PATH="$PATH:/root/.dotnet/tools" - dotnet sonarscanner begin /k:"${projectKey}" /d:"sonar.token=\${SONAR_TOKEN}" /d:"sonar.host.url=\${SONAR_HOST_URL}" diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts index e6f99d89295..8a9eb374f1d 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ export default function gradleExample(branchesEnabled: boolean, mainBranchName: string) { - return `image: openjdk:8 + return `image: eclipse-temurin:17 definitions: steps: diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts index 16f1b7a920b..23c48fc8ef1 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Maven.ts @@ -23,7 +23,7 @@ export default function mavenExample( projectKey: string, projectName: string ) { - return `image: maven:3-openjdk-11 + return `image: maven:3-eclipse-temurin-17 definitions: steps: diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts index eab0f6a35c6..e11d6421efc 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Others.ts @@ -25,7 +25,7 @@ definitions: - step: &build-step name: SonarQube analysis script: - - pipe: sonarsource/sonarqube-scan:1.0.0 + - pipe: sonarsource/sonarqube-scan:2.0.1 variables: SONAR_HOST_URL: \${SONAR_HOST_URL} # Get the value from the repository/workspace variable. SONAR_TOKEN: \${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here. diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/__snapshots__/GithubActionTutorial-it.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/__snapshots__/GithubActionTutorial-it.tsx.snap index d3d5ee8b8e7..841878b08e0 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/__snapshots__/GithubActionTutorial-it.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/__tests__/__snapshots__/GithubActionTutorial-it.tsx.snap @@ -18,10 +18,10 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 1.11 + java-version: 17 - name: Cache SonarQube packages uses: actions/cache@v1 with: @@ -80,7 +80,7 @@ jobs: - name: Download and install the SonarScanner env: - SONAR_SCANNER_VERSION: 4.6.2.2472 + SONAR_SCANNER_VERSION: 5.0.1.3006 run: | curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-\${{ env.SONAR_SCANNER_VERSION }}-linux.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ @@ -122,14 +122,14 @@ jobs: - name: Download and install the SonarScanner run: | - curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-macosx.zip + curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-macosx.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ - name: Build and analyse the project run: | # Potential improvement : add these paths to the PATH env var. $HOME/.sonar/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw-output - $HOME/.sonar/sonar-scanner-4.6.2.2472-macosx/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output + $HOME/.sonar/sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output env: SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}" @@ -168,16 +168,16 @@ jobs: - name: Download and install the SonarScanner shell: powershell run: | - $path = "$HOME/.sonar/sonar-scanner-cli-4.6.2.2472-windows.zip" + $path = "$HOME/.sonar/sonar-scanner-cli-5.0.1.3006-windows.zip" [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - (New-Object System.Net.WebClient).DownloadFile("https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-windows.zip", $path) + (New-Object System.Net.WebClient).DownloadFile("https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-windows.zip", $path) Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory($path, "$HOME/.sonar") - name: Build and analyse the project shell: powershell run: | - $env:Path += ";$HOME/.sonar/build-wrapper-win-x86;$HOME/.sonar/sonar-scanner-4.6.2.2472-windows/bin" + $env:Path += ";$HOME/.sonar/build-wrapper-win-x86;$HOME/.sonar/sonar-scanner-5.0.1.3006-windows/bin" build-wrapper-win-x86-64 --out-dir bw-output sonar-scanner.bat "-Dsonar.cfamily.build-wrapper-output=bw-output" env: @@ -205,10 +205,10 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Cache SonarQube packages uses: actions/cache@v1 with: @@ -273,10 +273,10 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Cache SonarQube packages uses: actions/cache@v1 with: diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx index b1a6589e7a0..ed1ed9d4283 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx @@ -48,7 +48,7 @@ const STEPS = { - name: Download and install the SonarScanner env: - SONAR_SCANNER_VERSION: 4.6.2.2472 + SONAR_SCANNER_VERSION: 5.0.1.3006 run: | curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-\${{ env.SONAR_SCANNER_VERSION }}-linux.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ @@ -71,14 +71,14 @@ const STEPS = { - name: Download and install the SonarScanner run: | - curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-macosx.zip + curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-macosx.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ - name: Build and analyse the project run: | # Potential improvement : add these paths to the PATH env var. $HOME/.sonar/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw-output - $HOME/.sonar/sonar-scanner-4.6.2.2472-macosx/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output + $HOME/.sonar/sonar-scanner-5.0.1.3006-macosx/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output env: SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}`, @@ -98,16 +98,16 @@ const STEPS = { - name: Download and install the SonarScanner shell: powershell run: | - $path = "$HOME/.sonar/sonar-scanner-cli-4.6.2.2472-windows.zip" + $path = "$HOME/.sonar/sonar-scanner-cli-5.0.1.3006-windows.zip" [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - (New-Object System.Net.WebClient).DownloadFile("https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-windows.zip", $path) + (New-Object System.Net.WebClient).DownloadFile("https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-5.0.1.3006-windows.zip", $path) Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory($path, "$HOME/.sonar") - name: Build and analyse the project shell: powershell run: | - $env:Path += ";$HOME/.sonar/build-wrapper-win-x86;$HOME/.sonar/sonar-scanner-4.6.2.2472-windows/bin" + $env:Path += ";$HOME/.sonar/build-wrapper-win-x86;$HOME/.sonar/sonar-scanner-5.0.1.3006-windows/bin" build-wrapper-win-x86-64 --out-dir bw-output sonar-scanner.bat "-Dsonar.cfamily.build-wrapper-output=bw-output" env: diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx index ad306727393..4226826ce63 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/DotNet.tsx @@ -31,10 +31,10 @@ export interface DotNetProps { function dotnetYamlSteps(projectKey: string) { return ` - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 1.11 + java-version: 17 - name: Cache SonarQube packages uses: actions/cache@v1 with: diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx index f5ab48b5b1d..4ba91605c9a 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx @@ -31,10 +31,10 @@ export interface GradleProps { } const GRADLE_YAML_STEPS = ` - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Cache SonarQube packages uses: actions/cache@v1 with: diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx index a619a5eeb87..ad62c76d3c7 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/JavaMaven.tsx @@ -31,10 +31,10 @@ export interface JavaMavenProps { function mavenYamlSteps(projectKey: string, projectName: string) { return ` - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v1 with: - java-version: 11 + java-version: 17 - name: Cache SonarQube packages uses: actions/cache@v1 with: diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/__snapshots__/GitLabCITutorial-it.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/__snapshots__/GitLabCITutorial-it.tsx.snap index 6d812c80298..95e5ac39f5f 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/__snapshots__/GitLabCITutorial-it.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/__tests__/__snapshots__/GitLabCITutorial-it.tsx.snap @@ -7,7 +7,7 @@ exports[`should follow and complete all steps: .NET: gitlab-ci.yml 1`] = ` sonarqube-check: stage: sonarqube-check - image: mcr.microsoft.com/dotnet/core/sdk:latest + image: mcr.microsoft.com/dotnet/sdk:7.0 variables: SONAR_USER_HOME: "\${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task @@ -17,7 +17,7 @@ sonarqube-check: - .sonar/cache script: - "apt-get update" - - "apt-get install --yes openjdk-11-jre" + - "apt-get install --yes --no-install-recommends openjdk-17-jre" - "dotnet tool install --global dotnet-sonarscanner" - "export PATH=\\"$PATH:$HOME/.dotnet/tools\\"" - "dotnet sonarscanner begin /k:\\"my-project\\" /d:sonar.token=\\"$SONAR_TOKEN\\" /d:\\"sonar.host.url=$SONAR_HOST_URL\\" " @@ -126,7 +126,7 @@ exports[`should follow and complete all steps: Maven: gitlab-ci.yml 1`] = ` sonarqube-check: stage: sonarqube-check - image: maven:3.9.3-eclipse-temurin-17 + image: maven:3-eclipse-temurin-17 variables: SONAR_USER_HOME: "\${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task @@ -178,7 +178,7 @@ exports[`should follow and complete all steps: Other: gitlab-ci.yml 1`] = ` sonarqube-check: stage: sonarqube-check image: - name: sonarsource/sonar-scanner-cli:latest + name: sonarsource/sonar-scanner-cli:5.0 entrypoint: [""] variables: SONAR_USER_HOME: "\${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx b/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx index b5d13db1e0b..ce0c8e6ec87 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/PipeCommand.tsx @@ -33,15 +33,15 @@ const BUILD_TOOL_SPECIFIC = { script: () => 'gradle sonar', }, [BuildTools.Maven]: { - image: 'maven:3.9.3-eclipse-temurin-17', + image: 'maven:3-eclipse-temurin-17', script: () => ` - mvn verify sonar:sonar`, }, [BuildTools.DotNet]: { - image: 'mcr.microsoft.com/dotnet/core/sdk:latest', + image: 'mcr.microsoft.com/dotnet/sdk:7.0', script: (projectKey: string) => ` - "apt-get update" - - "apt-get install --yes openjdk-11-jre" + - "apt-get install --yes --no-install-recommends openjdk-17-jre" - "dotnet tool install --global dotnet-sonarscanner" - "export PATH=\\"$PATH:$HOME/.dotnet/tools\\"" - "dotnet sonarscanner begin /k:\\"${projectKey}\\" /d:sonar.token=\\"$SONAR_TOKEN\\" /d:\\"sonar.host.url=$SONAR_HOST_URL\\" " @@ -50,7 +50,7 @@ const BUILD_TOOL_SPECIFIC = { }, [BuildTools.Other]: { image: ` - name: sonarsource/sonar-scanner-cli:latest + name: sonarsource/sonar-scanner-cli:5.0 entrypoint: [""]`, script: () => ` - sonar-scanner`, diff --git a/server/sonar-web/src/main/js/components/tutorials/other/__tests__/__snapshots__/OtherTutorial-it.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/other/__tests__/__snapshots__/OtherTutorial-it.tsx.snap index c0e950fa647..03ee8670e25 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/__tests__/__snapshots__/OtherTutorial-it.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/other/__tests__/__snapshots__/OtherTutorial-it.tsx.snap @@ -8,7 +8,7 @@ export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH `; exports[`can choose build tools and copy provided settings: cfamily linux: execute scanner 1`] = ` -"export SONAR_SCANNER_VERSION=4.7.0.2747 +"export SONAR_SCANNER_VERSION=5.0.1.3006 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ @@ -25,7 +25,7 @@ export PATH=$HOME/.sonar/build-wrapper-macosx-x86:$PATH `; exports[`can choose build tools and copy provided settings: cfamily macos: execute scanner 1`] = ` -"export SONAR_SCANNER_VERSION=4.7.0.2747 +"export SONAR_SCANNER_VERSION=5.0.1.3006 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-macosx curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-macosx.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ @@ -46,7 +46,7 @@ $env:Path += ";$env:SONAR_DIRECTORY/build-wrapper-win-x86" `; exports[`can choose build tools and copy provided settings: cfamily windows: execute scanner 1`] = ` -"$env:SONAR_SCANNER_VERSION = "4.7.0.2747" +"$env:SONAR_SCANNER_VERSION = "5.0.1.3006" $env:SONAR_DIRECTORY = [System.IO.Path]::Combine($(get-location).Path,".sonar") $env:SONAR_SCANNER_HOME = "$env:SONAR_DIRECTORY/sonar-scanner-$env:SONAR_SCANNER_VERSION-windows" rm $env:SONAR_SCANNER_HOME -Force -Recurse -ErrorAction SilentlyContinue @@ -97,7 +97,7 @@ exports[`can choose build tools and copy provided settings: maven: execute scann `; exports[`can choose build tools and copy provided settings: other linux: execute scanner 1`] = ` -"export SONAR_SCANNER_VERSION=4.7.0.2747 +"export SONAR_SCANNER_VERSION=5.0.1.3006 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ @@ -107,7 +107,7 @@ export SONAR_SCANNER_OPTS="-server" `; exports[`can choose build tools and copy provided settings: other macos: execute scanner 1`] = ` -"export SONAR_SCANNER_VERSION=4.7.0.2747 +"export SONAR_SCANNER_VERSION=5.0.1.3006 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-macosx curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-macosx.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ @@ -117,7 +117,7 @@ export SONAR_SCANNER_OPTS="-server" `; exports[`can choose build tools and copy provided settings: other windows: execute scanner 1`] = ` -"$env:SONAR_SCANNER_VERSION = "4.7.0.2747" +"$env:SONAR_SCANNER_VERSION = "5.0.1.3006" $env:SONAR_DIRECTORY = [System.IO.Path]::Combine($(get-location).Path,".sonar") $env:SONAR_SCANNER_HOME = "$env:SONAR_DIRECTORY/sonar-scanner-$env:SONAR_SCANNER_VERSION-windows" rm $env:SONAR_SCANNER_HOME -Force -Recurse -ErrorAction SilentlyContinue diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx index 93c8f98af14..d3ebe6db4b2 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx @@ -100,7 +100,7 @@ export default function DownloadScanner(props: DownloadScannerProps) { function getRemoteDownloadSnippet(os: OSs) { if (os === OSs.Windows) { - return `$env:SONAR_SCANNER_VERSION = "4.7.0.2747" + return `$env:SONAR_SCANNER_VERSION = "5.0.1.3006" $env:SONAR_DIRECTORY = [System.IO.Path]::Combine($(get-location).Path,".sonar") $env:SONAR_SCANNER_HOME = "$env:SONAR_DIRECTORY/sonar-scanner-$env:SONAR_SCANNER_VERSION-windows" rm $env:SONAR_SCANNER_HOME -Force -Recurse -ErrorAction SilentlyContinue @@ -114,7 +114,7 @@ $env:SONAR_SCANNER_OPTS="-server" `; } const suffix = os === OSs.MacOS ? 'macosx' : 'linux'; - return `export SONAR_SCANNER_VERSION=4.7.0.2747 + return `export SONAR_SCANNER_VERSION=5.0.1.3006 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-${suffix} curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-${suffix}.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ -- 2.39.5