aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2021-11-09 15:02:36 +0100
committersonartech <sonartech@sonarsource.com>2021-11-10 20:03:43 +0000
commitb7bdbaba01a50df04606cf44a88cc83c623b89c0 (patch)
treea0493c475e94bd5896d5ef92b192f46ef3181e3a /server
parent0031271ee4f383ee0e19d6f01944cbd8f29e58c9 (diff)
downloadsonarqube-b7bdbaba01a50df04606cf44a88cc83c623b89c0.tar.gz
sonarqube-b7bdbaba01a50df04606cf44a88cc83c623b89c0.zip
SONAR-15430 Fix C-family tutorial for GH Actions on linux
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/github-action/commands/CFamily.tsx13
-rw-r--r--server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/CFamily-test.tsx.snap13
2 files changed, 20 insertions, 6 deletions
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 }}