|
5 | 5 | ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token] |
6 | 6 | ARTIFACTORY_DEPLOY_REPO: sonarsource-pypi-public-qa |
7 | 7 | GITHUB_TOKEN: VAULT[development/github/token/licenses-ro token] |
8 | | - SONAR_TOKEN: VAULT[development/kv/data/next data.token] |
9 | | - SONAR_HOST_URL: https://next.sonarqube.com/sonarqube |
10 | 8 | DEPLOY_PULL_REQUEST: 'true' |
11 | 9 | POETRY_VIRTUALENVS_PATH: "~/.cache/poetry/venvs" |
12 | 10 | POETRY_CACHE_DIR: "~/.cache/poetry/pypoetry" |
@@ -158,25 +156,55 @@ documentation_task: |
158 | 156 | - poetry run python tools/generate_cli_documentation.py |
159 | 157 | - git diff --exit-code CLI_ARGS.md |
160 | 158 |
|
161 | | -analysis_linux_task: |
| 159 | +analysis_base_linux_template: &ANALYSIS_BASE_LINUX_TEMPLATE |
162 | 160 | <<: *LINUX_CONTAINER_DEFINITION |
163 | | - alias: analysis |
164 | | - name: "NEXT Analysis" |
| 161 | + alias: analysis_base_setup |
| 162 | + name: "Analysis Base Setup" |
165 | 163 | <<: *POETRY_INSTALL |
166 | | - # For NEXT analysis we don't need to set the build versions, but we still need to access jfrog to recover the dependencies |
167 | | - analysis_script: |
| 164 | + # For analysis we don't need to set the build versions, but we still need to access jfrog to recover the dependencies |
| 165 | + setup_script: |
168 | 166 | - poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests |
169 | 167 | - poetry run mypy src/ > mypy-report.txt || true # mypy exits with 1 if there are errors |
170 | 168 | - uv venv |
171 | 169 | - source .venv/bin/activate |
172 | 170 | - uv pip install pysonar |
173 | | - - . .cirrus/analysis.sh |
174 | 171 | always: |
175 | 172 | pytest_artifacts: |
176 | 173 | path: "coverage.xml" |
177 | 174 | format: junit |
178 | 175 | type: text/xml |
179 | 176 |
|
| 177 | +analysis_next_task: |
| 178 | + <<: *ANALYSIS_BASE_LINUX_TEMPLATE |
| 179 | + alias: sonar_analysis_next |
| 180 | + name: "NEXT Analysis" |
| 181 | + env: |
| 182 | + SONAR_TOKEN: VAULT[development/kv/data/next data.token] |
| 183 | + SONAR_HOST_URL: https://next.sonarqube.com/sonarqube |
| 184 | + # For NEXT analysis we don't need to set the build versions, but we still need to access jfrog to recover the dependencies |
| 185 | + analysis_script: |
| 186 | + - . .cirrus/analysis.sh |
| 187 | + |
| 188 | +analysis_SQC_EU_shadow_task: |
| 189 | + <<: *ANALYSIS_BASE_LINUX_TEMPLATE |
| 190 | + alias: sonar_analysis_shadow_sqc_eu |
| 191 | + name: "SQC-EU Shadow Analysis" |
| 192 | + env: |
| 193 | + SONAR_TOKEN: VAULT[development/kv/data/sonarcloud data.token] |
| 194 | + SONAR_HOST_URL: https://sonarcloud.io |
| 195 | + analysis_script: |
| 196 | + - . .cirrus/analysis.sh |
| 197 | + |
| 198 | +analysis_SQC_US_shadow_task: |
| 199 | + <<: *ANALYSIS_BASE_LINUX_TEMPLATE |
| 200 | + alias: sonar_analysis_shadow_sqc_us |
| 201 | + name: "SQC-US Shadow Analysis" |
| 202 | + env: |
| 203 | + SONAR_TOKEN: VAULT[development/kv/data/sonarqube-us data.token] |
| 204 | + SONAR_HOST_URL: https://sonarqube.us |
| 205 | + analysis_script: |
| 206 | + - . .cirrus/analysis.sh |
| 207 | + |
180 | 208 | qa_task: |
181 | 209 | alias: qa |
182 | 210 | matrix: |
@@ -275,7 +303,9 @@ its_macos_task: |
275 | 303 | promote_task: |
276 | 304 | depends_on: |
277 | 305 | - formatting |
278 | | - - analysis |
| 306 | + - sonar_analysis_next |
| 307 | + - sonar_analysis_shadow_sqc_eu |
| 308 | + - sonar_analysis_shadow_sqc_us |
279 | 309 | - qa |
280 | 310 | - qa_windows |
281 | 311 | - build |
|
0 commit comments