From: Jeremy Davis Date: Tue, 9 Nov 2021 14:02:36 +0000 (+0100) Subject: SONAR-15430 Fix C-family tutorial for GH Actions on linux X-Git-Tag: 9.2.0.49834~53 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b7bdbaba01a50df04606cf44a88cc83c623b89c0;p=sonarqube.git SONAR-15430 Fix C-family tutorial for GH Actions on linux --- 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 e10317533f4..552067f30e0 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,10 +48,17 @@ const STEPS = { env: SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }} + - name: Download and install the SonarScanner + env: + SONAR_SCANNER_VERSION: 4.6.2.2472 + 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/ + echo "$HOME/.sonar/sonar-scanner-\${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH + - name: SonarQube analysis - uses: SonarSource/sonarqube-scan-action@v1.0.0 - with: - args: -Dsonar.cfamily.build-wrapper-output=bw-output + run: | + sonar-scanner --define sonar.cfamily.build-wrapper-output=bw-output env: SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}`, diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/CFamily-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/CFamily-test.tsx.snap index 38c323434e5..112dd555078 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/CFamily-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/CFamily-test.tsx.snap @@ -117,10 +117,17 @@ jobs: env: SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }} + - name: Download and install the SonarScanner + env: + SONAR_SCANNER_VERSION: 4.6.2.2472 + 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/ + echo \\"$HOME/.sonar/sonar-scanner-\${{ env.SONAR_SCANNER_VERSION }}-linux/bin\\" >> $GITHUB_PATH + - name: SonarQube analysis - uses: SonarSource/sonarqube-scan-action@v1.0.0 - with: - args: -Dsonar.cfamily.build-wrapper-output=bw-output + run: | + sonar-scanner --define sonar.cfamily.build-wrapper-output=bw-output env: SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }}