]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-15833 Fix C/C++ tutorial for Bitbucket Pipelines
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Wed, 5 Jan 2022 14:11:06 +0000 (15:11 +0100)
committersonartech <sonartech@sonarsource.com>
Thu, 6 Jan 2022 20:03:09 +0000 (20:03 +0000)
server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/CFamily.ts

index 697363c2ecc66b86691d952f526855493513b75f..6a24055c89b5e8b55f61fa54d9805c273884ed95 100644 (file)
@@ -34,17 +34,18 @@ exports[`should render correctly for cfamily 1`] = `
 definitions:
   steps:
     - step: &build-step
-        name: Download and install the build wrapper, build the project
+        name: Build the project, and run the SonarQube analysis
         script:
+          - export SONAR_SCANNER_VERSION=4.6.2.2472
           - 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/
+          - curl -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/
+          - export PATH=\\"$PATH:$HOME/.sonar/sonar-scanner-\${SONAR_SCANNER_VERSION}-linux/bin\\"
+          - <any step required before running your build, like ./configure>
           - $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>
-          - pipe: sonarsource/sonarqube-scan:1.0.0
-            variables:
-              EXTRA_ARGS: -Dsonar.cfamily.build-wrapper-output=bw-output
-              SONAR_HOST_URL: \${SONAR_HOST_URL}
-              SONAR_TOKEN: \${SONAR_TOKEN}
+          - sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output  
   caches:
     sonar: ~/.sonar
 
@@ -97,17 +98,18 @@ exports[`should render correctly for cfamily: with branch enabled 1`] = `
 definitions:
   steps:
     - step: &build-step
-        name: Download and install the build wrapper, build the project
+        name: Build the project, and run the SonarQube analysis
         script:
+          - export SONAR_SCANNER_VERSION=4.6.2.2472
           - 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/
+          - curl -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/
+          - export PATH=\\"$PATH:$HOME/.sonar/sonar-scanner-\${SONAR_SCANNER_VERSION}-linux/bin\\"
+          - <any step required before running your build, like ./configure>
           - $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>
-          - pipe: sonarsource/sonarqube-scan:1.0.0
-            variables:
-              EXTRA_ARGS: -Dsonar.cfamily.build-wrapper-output=bw-output
-              SONAR_HOST_URL: \${SONAR_HOST_URL}
-              SONAR_TOKEN: \${SONAR_TOKEN}
+          - sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output  
   caches:
     sonar: ~/.sonar
 
index 3aa24a50cb3f4a5c2d71745d6363486be8cba2af..75f34dd76a1ce2c40419335513c72cdd6276d79b 100644 (file)
@@ -24,17 +24,18 @@ export default function cFamilyExample(branchesEnabled: boolean) {
 definitions:
   steps:
     - step: &build-step
-        name: Download and install the build wrapper, build the project
+        name: Build the project, and run the SonarQube analysis
         script:
+          - export SONAR_SCANNER_VERSION=4.6.2.2472
           - 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/
+          - curl -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/
+          - export PATH="$PATH:$HOME/.sonar/sonar-scanner-\${SONAR_SCANNER_VERSION}-linux/bin"
+          - <any step required before running your build, like ./configure>
           - $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>
-          - pipe: sonarsource/sonarqube-scan:1.0.0
-            variables:
-              EXTRA_ARGS: -Dsonar.cfamily.build-wrapper-output=bw-output
-              SONAR_HOST_URL: \${SONAR_HOST_URL}
-              SONAR_TOKEN: \${SONAR_TOKEN}
+          - sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output  
   caches:
     sonar: ~/.sonar