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.token=\${SONAR_TOKEN}" /d:"sonar.host.url=\${SONAR_HOST_URL}"
20 - dotnet sonarscanner end /d:"sonar.token=\${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: Groovy: build.gradle 1`] = `
100 id "org.sonarqube" version "4.0.0.2929"
105 property "sonar.projectKey", "my-project"
106 property "sonar.projectName", "MyProject"
111 exports[`should follow and complete all steps: Kotlin: build.gradle.kts 1`] = `
113 id("org.sonarqube") version "4.0.0.2929"
118 property("sonar.projectKey", "my-project")
119 property("sonar.projectName", "MyProject")
124 exports[`should follow and complete all steps: Maven: bitbucket-pipelines.yml 1`] = `
125 "image: maven:3-openjdk-11
130 name: SonarQube analysis
135 - mvn verify sonar:sonar -Dsonar.projectKey=my-project -Dsonar.projectName='MyProject'
152 exports[`should follow and complete all steps: Other: .github/workflows/build.yml 1`] = `
158 name: SonarQube analysis
160 - pipe: sonarsource/sonarqube-scan:1.0.0
162 SONAR_HOST_URL: \${SONAR_HOST_URL} # Get the value from the repository/workspace variable.
163 SONAR_TOKEN: \${SONAR_TOKEN} # Get the value from the repository/workspace variable. You shouldn't set secret in clear text here.
181 exports[`should follow and complete all steps: Other: sonar-project.properties 1`] = `"sonar.projectKey=my-project"`;
183 exports[`should follow and complete all steps: sonar token key 1`] = `"SONAR_TOKEN"`;
185 exports[`should follow and complete all steps: sonarqube host url key 1`] = `"SONAR_HOST_URL"`;
187 exports[`should follow and complete all steps: sonarqube host url value 1`] = `"http://localhost:9000"`;