10
10
DEPLOY_PULL_REQUEST : ' true'
11
11
POETRY_VIRTUALENVS_PATH : " ~/.cache/poetry/venvs"
12
12
POETRY_CACHE_DIR : " ~/.cache/poetry/pypoetry"
13
+ SONARQUBE_VERSION : 25.3.0.104237
13
14
14
15
only_if : $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == 'master' || $CIRRUS_BRANCH =~ "branch-.*")
15
16
container_definition : &CONTAINER_DEFINITION
@@ -29,7 +30,7 @@ container_definition: &CONTAINER_DEFINITION
29
30
poetry_cache_template : &POETRY_CACHE
30
31
poetry_cache :
31
32
folder : ~/.cache/poetry/
32
- fingerprint_script : cat poetry.lock its/poetry.lock
33
+ fingerprint_script : cat poetry.lock
33
34
34
35
.poetry_template : &POETRY_TEMPLATE
35
36
eks_container :
@@ -73,8 +74,7 @@ formatting_task:
73
74
- poetry run black src/ tests/ --check
74
75
- poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d src/
75
76
- poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d tests/
76
- - poetry run licenseheaders -t license_header.tmpl -o "SonarSource SA" -y 2011-2024 -n "Sonar Scanner Python" -E .py -d its/ -x its/sources/**.py
77
- - git diff --name-only --exit-code ./src ./tests ./its
77
+ - git diff --name-only --exit-code ./src ./tests
78
78
79
79
analysis_task :
80
80
<< : *POETRY_TEMPLATE
@@ -130,20 +130,19 @@ its_task:
130
130
alias : its
131
131
sonarqube_cache :
132
132
folder : sonarqube_cache/
133
- populate_script : mkdir -p sonarqube_cache && wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-10.5.1.90531 .zip -O sonarqube_cache/sonarqube.zip
134
- fingerprint_key : sonarqube-10.5.1.90531
133
+ populate_script : mkdir -p sonarqube_cache && wget -q https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-$SONARQUBE_VERSION .zip -O sonarqube_cache/sonarqube.zip
134
+ fingerprint_script : echo " sonarqube-$SONARQUBE_VERSION"
135
135
<< : *POETRY_TEMPLATE
136
136
its_script :
137
137
- unzip -q sonarqube_cache/sonarqube.zip -d sonarqube
138
138
- cd $(ls -d sonarqube/*/)
139
139
- ./bin/linux-x86-64/sonar.sh start
140
140
- cd -
141
- - cd its/
142
141
- jfrog poetry-config --server-id-resolve repox --repo-resolve sonarsource-pypi
143
142
- jfrog poetry install
144
143
- unset SONAR_TOKEN
145
144
- unset SONAR_HOST_URL
146
- - poetry run pytest
145
+ - poetry run pytest --its tests/its
147
146
148
147
promote_task :
149
148
depends_on :
0 commit comments