1 // Jest Snapshot v1, https://goo.gl/fbAQLP
3 exports[`should render correctly for cfamily: branches enabled 1`] = `
6 snippet="image: <image ready for your build toolchain>
21 - curl -sSLo build-wrapper-linux-x86.zip $SONAR_HOST_URL/static/cpp/build-wrapper-linux-x86.zip
22 - unzip -o build-wrapper-linux-x86.zip -d .sonar
27 - .sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir .sonar/bw-output <your clean build command>
32 - curl -sSLo sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip
33 - unzip -o sonar-scanner.zip -d .sonar
34 - .sonar/sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=.sonar/bw-output
41 exports[`should render correctly for cfamily: branches not enabled 1`] = `
44 snippet="image: <image ready for your build toolchain>
59 - curl -sSLo build-wrapper-linux-x86.zip $SONAR_HOST_URL/static/cpp/build-wrapper-linux-x86.zip
60 - unzip -o build-wrapper-linux-x86.zip -d .sonar
65 - .sonar/build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir .sonar/bw-output <your clean build command>
70 - curl -sSLo sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip
71 - unzip -o sonar-scanner.zip -d .sonar
72 - .sonar/sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner -Dsonar.cfamily.build-wrapper-output=.sonar/bw-output
79 exports[`should render correctly for dotnet: branches enabled 1`] = `
82 snippet="sonarqube-check:
83 image: mcr.microsoft.com/dotnet/core/sdk:latest
85 SONAR_USER_HOME: \\"\${CI_PROJECT_DIR}/.sonar\\" # Defines the location of the analysis task cache
86 GIT_DEPTH: \\"0\\" # Tells git to fetch all the branches of the project, required by the analysis task
88 key: \\"\${CI_JOB_NAME}\\"
92 - \\"apt-get update\\"
93 - \\"apt-get install --yes openjdk-11-jre\\"
94 - \\"dotnet tool install --global dotnet-sonarscanner\\"
95 - \\"export PATH=\\\\\\"$PATH:$HOME/.dotnet/tools\\\\\\"\\"
96 - \\"dotnet sonarscanner begin /k:\\\\\\"test\\\\\\" /d:sonar.login=\\\\\\"$SONAR_TOKEN\\\\\\" /d:\\\\\\"sonar.host.url=$SONAR_HOST_URL\\\\\\" \\"
98 - \\"dotnet sonarscanner end /d:sonar.login=\\\\\\"$SONAR_TOKEN\\\\\\"\\"
109 exports[`should render correctly for dotnet: branches not enabled 1`] = `
112 snippet="sonarqube-check:
113 image: mcr.microsoft.com/dotnet/core/sdk:latest
115 SONAR_USER_HOME: \\"\${CI_PROJECT_DIR}/.sonar\\" # Defines the location of the analysis task cache
116 GIT_DEPTH: \\"0\\" # Tells git to fetch all the branches of the project, required by the analysis task
118 key: \\"\${CI_JOB_NAME}\\"
122 - \\"apt-get update\\"
123 - \\"apt-get install --yes openjdk-11-jre\\"
124 - \\"dotnet tool install --global dotnet-sonarscanner\\"
125 - \\"export PATH=\\\\\\"$PATH:$HOME/.dotnet/tools\\\\\\"\\"
126 - \\"dotnet sonarscanner begin /k:\\\\\\"test\\\\\\" /d:sonar.login=\\\\\\"$SONAR_TOKEN\\\\\\" /d:\\\\\\"sonar.host.url=$SONAR_HOST_URL\\\\\\" \\"
128 - \\"dotnet sonarscanner end /d:sonar.login=\\\\\\"$SONAR_TOKEN\\\\\\"\\"
139 exports[`should render correctly for gradle: branches enabled 1`] = `
142 snippet="sonarqube-check:
143 image: gradle:jre11-slim
145 SONAR_USER_HOME: \\"\${CI_PROJECT_DIR}/.sonar\\" # Defines the location of the analysis task cache
146 GIT_DEPTH: \\"0\\" # Tells git to fetch all the branches of the project, required by the analysis task
148 key: \\"\${CI_JOB_NAME}\\"
151 script: gradle sonarqube
162 exports[`should render correctly for gradle: branches not enabled 1`] = `
165 snippet="sonarqube-check:
166 image: gradle:jre11-slim
168 SONAR_USER_HOME: \\"\${CI_PROJECT_DIR}/.sonar\\" # Defines the location of the analysis task cache
169 GIT_DEPTH: \\"0\\" # Tells git to fetch all the branches of the project, required by the analysis task
171 key: \\"\${CI_JOB_NAME}\\"
174 script: gradle sonarqube
185 exports[`should render correctly for maven: branches enabled 1`] = `
188 snippet="sonarqube-check:
189 image: maven:3.6.3-jdk-11
191 SONAR_USER_HOME: \\"\${CI_PROJECT_DIR}/.sonar\\" # Defines the location of the analysis task cache
192 GIT_DEPTH: \\"0\\" # Tells git to fetch all the branches of the project, required by the analysis task
194 key: \\"\${CI_JOB_NAME}\\"
198 - mvn verify sonar:sonar
209 exports[`should render correctly for maven: branches not enabled 1`] = `
212 snippet="sonarqube-check:
213 image: maven:3.6.3-jdk-11
215 SONAR_USER_HOME: \\"\${CI_PROJECT_DIR}/.sonar\\" # Defines the location of the analysis task cache
216 GIT_DEPTH: \\"0\\" # Tells git to fetch all the branches of the project, required by the analysis task
218 key: \\"\${CI_JOB_NAME}\\"
222 - mvn verify sonar:sonar
233 exports[`should render correctly for other: branches enabled 1`] = `
236 snippet="sonarqube-check:
238 name: sonarsource/sonar-scanner-cli:latest
241 SONAR_USER_HOME: \\"\${CI_PROJECT_DIR}/.sonar\\" # Defines the location of the analysis task cache
242 GIT_DEPTH: \\"0\\" # Tells git to fetch all the branches of the project, required by the analysis task
244 key: \\"\${CI_JOB_NAME}\\"
259 exports[`should render correctly for other: branches not enabled 1`] = `
262 snippet="sonarqube-check:
264 name: sonarsource/sonar-scanner-cli:latest
267 SONAR_USER_HOME: \\"\${CI_PROJECT_DIR}/.sonar\\" # Defines the location of the analysis task cache
268 GIT_DEPTH: \\"0\\" # Tells git to fetch all the branches of the project, required by the analysis task
270 key: \\"\${CI_JOB_NAME}\\"