1 // Jest Snapshot v1, https://goo.gl/fbAQLP
3 exports[`should follow and complete all steps: .NET: bitbucket-pipelines.yml 1`] = `
4 "image: mcr.microsoft.com/dotnet/core/sdk:latest
9 name: SonarQube analysis
15 - apt-get install --yes openjdk-11-jre
16 - dotnet tool install --global dotnet-sonarscanner
17 - export PATH="$PATH:/root/.dotnet/tools"
18 - dotnet sonarscanner begin /k:"my-project" /d:"sonar.login=\${SONAR_TOKEN}" /d:"sonar.host.url=\${SONAR_HOST_URL}"
20 - dotnet sonarscanner end /d:"sonar.login=\${SONAR_TOKEN}"
34 exports[`should follow and complete all steps: CFamily: bitbucket-pipelines.yml 1`] = `
35 "image: <image ready for your build toolchain>
40 name: Build the project, and run the SonarQube analysis
42 - export SONAR_SCANNER_VERSION=4.6.2.2472
44 - curl -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \${SONAR_HOST_URL}/static/cpp/build-wrapper-linux-x86.zip
45 - unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
46 - curl -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-\${SONAR_SCANNER_VERSION}-linux.zip
47 - unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
48 - export PATH="$PATH:$HOME/.sonar/sonar-scanner-\${SONAR_SCANNER_VERSION}-linux/bin"
49 - <any step required before running your build, like ./configure>
50 - $HOME/.sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw-output <your clean build command>
51 - sonar-scanner -Dsonar.cfamily.build-wrapper-output=bw-output
68 exports[`should follow and complete all steps: CFamily: sonar-project.properties 1`] = `"sonar.projectKey=my-project"`;
70 exports[`should follow and complete all steps: Gradle: bitbucket-pipelines.yml 1`] = `
76 name: SonarQube analysis
81 - bash ./gradlew sonar
98 exports[`should follow and complete all steps: Gradle: build.gradle 1`] = `
100 id "org.sonarqube" version "3.5.0.2730"
105 property "sonar.projectKey", "my-project"
106 property "sonar.projectName", "MyProject"
111 exports[`should follow and complete all steps: Maven: bitbucket-pipelines.yml 1`] = `
112 "image: maven:3-openjdk-11
117 name: SonarQube analysis
122 - mvn verify sonar:sonar -Dsonar.projectKey=my-project -Dsonar.projectName='MyProject'
139 exports[`should follow and complete all steps: Other: .github/workflows/build.yml 1`] = `
145 name: SonarQube analysis
147 - pipe: sonarsource/sonarqube-scan:1.0.0
149 SONAR_HOST_URL: \${SONAR_HOST_URL} # Get the value from the repository/workspace variable.
150 SONAR_TOKEN: \${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here.
168 exports[`should follow and complete all steps: Other: sonar-project.properties 1`] = `"sonar.projectKey=my-project"`;
170 exports[`should follow and complete all steps: sonar token key 1`] = `"SONAR_TOKEN"`;
172 exports[`should follow and complete all steps: sonarqube host url key 1`] = `"SONAR_HOST_URL"`;
174 exports[`should follow and complete all steps: sonarqube host url value 1`] = `"http://localhost:9000"`;