From 65d16f6219f1e3ba719c9d2ca03766d23ac715de Mon Sep 17 00:00:00 2001 From: Sebastian Zumbrunn Date: Fri, 13 Dec 2024 17:05:30 +0100 Subject: [PATCH] SONARPY-2432: Split build into building and testing (#2236) --- .cirrus.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9760526bd9..df666178f5 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -76,6 +76,28 @@ orchestrator_cache_definition: &ORCHESTRATOR_CACHE_DEFINITION build_task: <<: *BUILD_CONTAINER_DEFINITION <<: *ONLY_SONARSOURCE_QA + env: + # analysis on next + SONAR_TOKEN: dummy-value + SONAR_HOST_URL: dummy-value + #allow deployment of pull request artifacts to repox + DEPLOY_PULL_REQUEST: true + CIRRUS_CLONE_DEPTH: 50 + SIGN_KEY: VAULT[development/kv/data/sign data.key] + PGP_PASSPHRASE: VAULT[development/kv/data/sign data.passphrase] + maven_cache: + folder: ${CIRRUS_WORKING_DIR}/.m2/repository + build_script: + - source cirrus-env BUILD + - regular_mvn_build_deploy_analyze -DskipTests=true -Dsonar.skip=true -P-typeshed_serializer + - ./check-license-compliance.sh + cleanup_before_cache_script: cleanup_maven_repository + +test_analyze_task: + depends_on: + - build + <<: *BUILD_CONTAINER_DEFINITION + <<: *ONLY_SONARSOURCE_QA env: # analysis on next SONAR_TOKEN: VAULT[development/kv/data/next data.token] @@ -87,15 +109,14 @@ build_task: PGP_PASSPHRASE: VAULT[development/kv/data/sign data.passphrase] maven_cache: folder: ${CIRRUS_WORKING_DIR}/.m2/repository - build_script: + analyze_script: - git submodule update --init - cd python-frontend/typeshed_serializer/resources/python-type-stubs - - git sparse-checkout set stubs/sklearn + - git sparse-checkout set stubs/sklearn - git checkout - cd - - source cirrus-env BUILD - - regular_mvn_build_deploy_analyze -DfailStubGenerationFast=true - - ./check-license-compliance.sh + - DEPLOY_PULL_REQUEST=false regular_mvn_build_deploy_analyze -DfailStubGenerationFast=true -P-release,-sign -Dsonar.analysisCache.enabled=true -Dskip.its=true cleanup_before_cache_script: cleanup_maven_repository build_win_task: @@ -208,6 +229,7 @@ pr_analysis_qa_task: promote_task: depends_on: + - test_analyze - ruling - plugin_qa - ws_scan