Skip to content

Commit 65d16f6

Browse files
authored
SONARPY-2432: Split build into building and testing (#2236)
1 parent 8a7caa9 commit 65d16f6

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

.cirrus.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,28 @@ orchestrator_cache_definition: &ORCHESTRATOR_CACHE_DEFINITION
7676
build_task:
7777
<<: *BUILD_CONTAINER_DEFINITION
7878
<<: *ONLY_SONARSOURCE_QA
79+
env:
80+
# analysis on next
81+
SONAR_TOKEN: dummy-value
82+
SONAR_HOST_URL: dummy-value
83+
#allow deployment of pull request artifacts to repox
84+
DEPLOY_PULL_REQUEST: true
85+
CIRRUS_CLONE_DEPTH: 50
86+
SIGN_KEY: VAULT[development/kv/data/sign data.key]
87+
PGP_PASSPHRASE: VAULT[development/kv/data/sign data.passphrase]
88+
maven_cache:
89+
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
90+
build_script:
91+
- source cirrus-env BUILD
92+
- regular_mvn_build_deploy_analyze -DskipTests=true -Dsonar.skip=true -P-typeshed_serializer
93+
- ./check-license-compliance.sh
94+
cleanup_before_cache_script: cleanup_maven_repository
95+
96+
test_analyze_task:
97+
depends_on:
98+
- build
99+
<<: *BUILD_CONTAINER_DEFINITION
100+
<<: *ONLY_SONARSOURCE_QA
79101
env:
80102
# analysis on next
81103
SONAR_TOKEN: VAULT[development/kv/data/next data.token]
@@ -87,15 +109,14 @@ build_task:
87109
PGP_PASSPHRASE: VAULT[development/kv/data/sign data.passphrase]
88110
maven_cache:
89111
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
90-
build_script:
112+
analyze_script:
91113
- git submodule update --init
92114
- cd python-frontend/typeshed_serializer/resources/python-type-stubs
93-
- git sparse-checkout set stubs/sklearn
115+
- git sparse-checkout set stubs/sklearn
94116
- git checkout
95117
- cd -
96118
- source cirrus-env BUILD
97-
- regular_mvn_build_deploy_analyze -DfailStubGenerationFast=true
98-
- ./check-license-compliance.sh
119+
- DEPLOY_PULL_REQUEST=false regular_mvn_build_deploy_analyze -DfailStubGenerationFast=true -P-release,-sign -Dsonar.analysisCache.enabled=true -Dskip.its=true
99120
cleanup_before_cache_script: cleanup_maven_repository
100121

101122
build_win_task:
@@ -208,6 +229,7 @@ pr_analysis_qa_task:
208229

209230
promote_task:
210231
depends_on:
232+
- test_analyze
211233
- ruling
212234
- plugin_qa
213235
- ws_scan

0 commit comments

Comments
 (0)