Skip to content

Commit 2e22d5e

Browse files
committed
SCANPY-197 setup shadow scans
1 parent cef4b75 commit 2e22d5e

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

.cirrus.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ env:
55
ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token]
66
ARTIFACTORY_DEPLOY_REPO: sonarsource-pypi-public-qa
77
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
108
DEPLOY_PULL_REQUEST: 'true'
119
POETRY_VIRTUALENVS_PATH: "~/.cache/poetry/venvs"
1210
POETRY_CACHE_DIR: "~/.cache/poetry/pypoetry"
@@ -158,12 +156,12 @@ documentation_task:
158156
- poetry run python tools/generate_cli_documentation.py
159157
- git diff --exit-code CLI_ARGS.md
160158

161-
analysis_linux_task:
159+
analysis_base_linux_template: &ANALYSIS_BASE_LINUX_TEMPLATE
162160
<<: *LINUX_CONTAINER_DEFINITION
163-
alias: analysis
164-
name: "NEXT Analysis"
161+
alias: analysis_base
162+
name: "Analysis Base"
165163
<<: *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
164+
# For analysis we don't need to set the build versions, but we still need to access jfrog to recover the dependencies
167165
analysis_script:
168166
- poetry run pytest --cov-report=xml:coverage.xml --cov-config=pyproject.toml --cov=src --cov-branch tests
169167
- poetry run mypy src/ > mypy-report.txt || true # mypy exits with 1 if there are errors
@@ -177,6 +175,30 @@ analysis_linux_task:
177175
format: junit
178176
type: text/xml
179177

178+
analysis_next_task:
179+
<<: *ANALYSIS_BASE_LINUX_TEMPLATE
180+
alias: sonar_analysis_next
181+
name: "NEXT Analysis"
182+
env:
183+
SONAR_TOKEN: VAULT[development/kv/data/next data.token]
184+
SONAR_HOST_URL: https://next.sonarqube.com/sonarqube
185+
186+
analysis_SQC_EU_shadow_task:
187+
<<: *ANALYSIS_BASE_LINUX_TEMPLATE
188+
alias: sonar_analysis_shadow_sqc_eu
189+
name: "SQC-EU Shadow Analysis"
190+
env:
191+
SONAR_TOKEN: VAULT[development/kv/data/sonarcloud data.token]
192+
SONAR_HOST_URL: https://sonarcloud.io
193+
194+
analysis_SQC_US_shadow_task:
195+
<<: *ANALYSIS_BASE_LINUX_TEMPLATE
196+
alias: sonar_analysis_shadow_sqc_us
197+
name: "SQC-US Shadow Analysis"
198+
env:
199+
SONAR_TOKEN: VAULT[development/kv/data/sonarqube-us data.token]
200+
SONAR_HOST_URL: https://sonarqube.us
201+
180202
qa_task:
181203
alias: qa
182204
matrix:
@@ -275,7 +297,9 @@ its_macos_task:
275297
promote_task:
276298
depends_on:
277299
- formatting
278-
- analysis
300+
- sonar_analysis_next
301+
- sonar_analysis_shadow_sqc_eu
302+
- sonar_analysis_shadow_sqc_us
279303
- qa
280304
- qa_windows
281305
- build

sonar-project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sonar.projectKey=SonarSource_sonar-scanner-python
22
sonar.projectName=Python Scanner
3+
sonar.organization=sonarsource
34
sonar.python.version=3.9,3.10,3.11,3.12,3.13
45
sonar.python.coverage.reportPaths=coverage.xml
56
sonar.python.mypy.reportPaths=mypy-report.txt

0 commit comments

Comments
 (0)