@@ -51,8 +51,7 @@ log_develocity_url_script: &log_develocity_url_script |
5151
5252common_build_definition : &COMMON_BUILD_DEFINITION
5353 eks_container :
54- << : *CONTAINER_DEFINITION
55- image : ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j23-latest
54+ << : *CONTAINER_WITH_DOCKER_DEFINITION
5655 cpu : 4
5756 memory : 4G
5857 env :
@@ -63,6 +62,7 @@ common_build_definition: &COMMON_BUILD_DEFINITION
6362 SONAR_HOST_URL : https://next.sonarqube.com/sonarqube
6463 # allow deployment of pull request artifacts to repox
6564 DEPLOY_PULL_REQUEST : true
65+ JAVA_HOME : /opt/java/openjdk-latest
6666 maven_cache :
6767 folder : ${CIRRUS_WORKING_DIR}/.m2/repository
6868
@@ -86,7 +86,33 @@ build_task:
8686 build_script :
8787 - *log_develocity_url_script
8888 - source cirrus-env BUILD
89- - regular_mvn_build_deploy_analyze -Dmaven.test.skip=true -Dsonar.skip=true -pl '!java-checks-test-sources/default,!java-checks-test-sources/aws'
89+ - regular_mvn_build_deploy_analyze -Dmaven.test.skip=true -Dsonar.skip=true -pl '!java-checks-test-sources/default,!java-checks-test-sources/aws,!java-checks-test-sources/spring-web-4.0'
90+ cleanup_before_cache_script : cleanup_maven_repository
91+
92+ sonar_shadow_scan_and_issue_replication_task :
93+ << : *COMMON_BUILD_DEFINITION
94+ depends_on :
95+ - build
96+ # Only run when triggered by the cirrus-ci cron job named "nightly"
97+ only_if : $CIRRUS_CRON == "nightly"
98+ env :
99+ SONAR_PROJECT_KEY : " org.sonarsource.java:java"
100+ SHADOW_ORGANIZATION : " sonarsource"
101+ SHADOW_PROJECT_KEY : " SonarSource_sonar-java"
102+ # to replicate issue states from next
103+ SONAR_TOKEN : VAULT[development/kv/data/next data.token]
104+ SONAR_HOST_URL : https://next.sonarqube.com/sonarqube
105+ matrix :
106+ - name : " sonarcloud.io"
107+ SHADOW_SONAR_TOKEN : VAULT[development/kv/data/sonarcloud data.token]
108+ SHADOW_SONAR_HOST_URL : " https://sonarcloud.io"
109+ - name : " sonarqube.us"
110+ SHADOW_SONAR_TOKEN : VAULT[development/kv/data/sonarqube-us data.token]
111+ SHADOW_SONAR_HOST_URL : " https://sonarqube.us"
112+ build_and_shadow_scan_script :
113+ - *log_develocity_url_script
114+ - source cirrus-env BUILD
115+ - ./shadow-scan-and-issue-replication.sh -Dsonar.analysisCache.enabled=true -Dsonar.sca.exclusions="**/test/files/**, **/test/resources/**, its/plugin/projects/**, java-checks-test-sources/**, its/sources/**,"
90116 cleanup_before_cache_script : cleanup_maven_repository
91117
92118# Migrated to GHA.
@@ -96,36 +122,14 @@ test_analyze_task:
96122 - *log_develocity_url_script
97123 - source cirrus-env BUILD
98124 # ignore duplications in the SE engine plugin, as it will be moved away from sonar-java at some point
99- - PULL_REQUEST_SHA=$GIT_SHA1 regular_mvn_build_deploy_analyze -P-deploy-sonarsource,-release,-sign -Dmaven.deploy.skip=true -Dsonar.analysisCache.enabled=true -Dsonar.cpd .exclusions=java-symbolic-execution /**
125+ - PULL_REQUEST_SHA=$GIT_SHA1 regular_mvn_build_deploy_analyze -P-deploy-sonarsource,-release,-sign -Dmaven.deploy.skip=true -Dsonar.analysisCache.enabled=true -Dsonar.sca .exclusions="**/test/files/**, **/test/resources/**, its/plugin/projects/**, java-checks-test-sources /**, its/sources/**,"
100126 - cd docs/java-custom-rules-example
101127 - mvn clean package -f pom_SQ_10_6_LATEST.xml --batch-mode
102128 - cd "${CIRRUS_WORKING_DIR}"
103129 - ./check-license-compliance.sh
104130 cleanup_before_cache_script : cleanup_maven_repository
105131
106- ws_scan_task :
107- << : *ONLY_SONARSOURCE_QA
108- eks_container :
109- << : *CONTAINER_DEFINITION
110- image : ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
111- cpu : 4
112- memory : 4G
113- # run only on master and long-term branches
114- only_if : $CIRRUS_USER_COLLABORATOR == 'true' && ($CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BRANCH =~ "mend-.*")
115- env :
116- WS_APIKEY : VAULT[development/kv/data/mend data.apikey]
117- maven_cache :
118- folder : ${CIRRUS_WORKING_DIR}/.m2/repository
119- whitesource_script :
120- - source cirrus-env QA
121- - source set_maven_build_version $BUILD_NUMBER
122- - mvn clean install --batch-mode -Dmaven.test.skip=true -pl '!java-checks-test-sources,!java-checks-test-sources/default,!java-checks-test-sources/aws,!java-checks-test-sources/spring-3.2'
123- - source ws_scan.sh
124- allow_failures : " true"
125- always :
126- ws_artifacts :
127- path : " whitesource/**/*"
128-
132+ # Migrated to GHA.
129133qa_os_win_task :
130134 ec2_instance :
131135 image : base-windows-jdk21-v*
@@ -146,13 +150,19 @@ plugin_qa_task:
146150 - build
147151 << : *ONLY_SONARSOURCE_QA
148152 eks_container :
149- << : *CONTAINER_DEFINITION
150- image : ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
153+ << : *CONTAINER_WITH_DOCKER_DEFINITION
151154 cpu : 14
152- memory : 6G
155+ memory : 16G
153156 << : *ORCHESTRATOR_CACHE_PREPARATION_DEFINITION
154- orchestrator_LATEST_RELEASE_cache :
155- << : *ORCHESTRATOR_CACHE_ELEMENTS_DEFINITION
157+ matrix :
158+ - env :
159+ SQ_VERSION : LATEST_RELEASE
160+ orchestrator_LATEST_RELEASE_cache :
161+ << : *ORCHESTRATOR_CACHE_ELEMENTS_DEFINITION
162+ - env :
163+ SQ_VERSION : DEV
164+ orchestrator_DEV_cache :
165+ << : *ORCHESTRATOR_CACHE_ELEMENTS_DEFINITION
156166
157167 maven_cache :
158168 folder : ${CIRRUS_WORKING_DIR}/.m2/repository
@@ -163,7 +173,7 @@ plugin_qa_task:
163173 - source cirrus-env QA
164174 - source set_maven_build_version $BUILD_NUMBER
165175 - cd its/plugin
166- - mvn package --batch-mode -Pit-plugin -Dsonar.runtimeVersion=LATEST_RELEASE[2025.1] -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=classes -DuseUnlimitedThreads=true
176+ - mvn package --batch-mode -Pit-plugin -Dsonar.runtimeVersion=${SQ_VERSION} -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=classes -DuseUnlimitedThreads=true
167177 cleanup_before_cache_script : cleanup_maven_repository
168178
169179# Migrated to GHA.
@@ -172,12 +182,13 @@ sanity_task:
172182 - build
173183 << : *ONLY_SONARSOURCE_QA
174184 eks_container :
175- << : *CONTAINER_DEFINITION
176- image : ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j23-latest
185+ << : *CONTAINER_WITH_DOCKER_DEFINITION
177186 cpu : 4
178- memory : 4G
187+ memory : 16G
179188 maven_cache :
180189 folder : ${CIRRUS_WORKING_DIR}/.m2/repository
190+ env :
191+ JAVA_HOME : /opt/java/openjdk-latest
181192 sanity_script :
182193 - *log_develocity_url_script
183194 - source cirrus-env QA
@@ -194,10 +205,9 @@ ruling_task:
194205 - build
195206 << : *ONLY_SONARSOURCE_QA
196207 eks_container :
197- << : *CONTAINER_DEFINITION
198- image : ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
208+ << : *CONTAINER_WITH_DOCKER_DEFINITION
199209 cpu : 14
200- memory : 6G
210+ memory : 16G
201211 maven_cache :
202212 folder : ${CIRRUS_WORKING_DIR}/.m2/repository
203213 << : *ORCHESTRATOR_CACHE_PREPARATION_DEFINITION
@@ -215,7 +225,7 @@ ruling_task:
215225 - source cirrus-env QA
216226 - source set_maven_build_version $BUILD_NUMBER
217227 - cd its/ruling
218- - mvn package --batch-mode "-Pit-ruling,$PROFILE" -Dsonar.runtimeVersion=LATEST_RELEASE[2025.1] -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=methods -DuseUnlimitedThreads=true
228+ - mvn package --batch-mode "-Pit-ruling,$PROFILE" -Dsonar.runtimeVersion=LATEST_RELEASE -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=methods -DuseUnlimitedThreads=true
219229 cleanup_before_cache_script : cleanup_maven_repository
220230 on_failure :
221231 actual_artifacts :
@@ -246,7 +256,7 @@ ruling_win_task:
246256 - init_git_submodules its/sources
247257 - git submodule update --init --recursive
248258 - cd its/ruling
249- - mvn package --batch-mode "-Pit-ruling,$PROFILE" -Dsonar.runtimeVersion=LATEST_RELEASE[2025.1] -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=methods -DuseUnlimitedThreads=true
259+ - mvn package --batch-mode "-Pit-ruling,$PROFILE" -Dsonar.runtimeVersion=LATEST_RELEASE -Dmaven.test.redirectTestOutputToFile=false -B -e -V -Dparallel=methods -DuseUnlimitedThreads=true
250260 cleanup_before_cache_script : cleanup_maven_repository
251261
252262# Migrated to GHA.
@@ -257,11 +267,11 @@ autoscan_task:
257267 eks_container :
258268 << : *CONTAINER_WITH_DOCKER_DEFINITION
259269 # For now, this autoscan_task need to execute two mvn commands:
260- # * The build of java-checks-test-sources module which requires Java 23 .
261- # * The tests using Orchestrator and SonarQube that, for now, fail to work using Java 23
262- # This is why we have a local Dockerfile that provide the 2 versions of Java, 17 and 23 .
270+ # * The build of java-checks-test-sources module which requires Java 24 .
271+ # * The tests using Orchestrator and SonarQube that, for now, fail to work using Java 24
272+ # This is why we have a local Dockerfile that provide the 2 versions of Java, 17 and 24 .
263273 cpu : 14
264- memory : 6G
274+ memory : 16G
265275 maven_cache :
266276 folder : ${CIRRUS_WORKING_DIR}/.m2/repository
267277 << : *ORCHESTRATOR_CACHE_PREPARATION_DEFINITION
@@ -272,9 +282,9 @@ autoscan_task:
272282 - source cirrus-env QA
273283 - source set_maven_build_version $BUILD_NUMBER
274284 - cd java-checks-test-sources
275- - JAVA_HOME="${JAVA_LATEST_HOME}" mvn clean compile test-compile --batch-mode
285+ - JAVA_HOME=/opt/java/openjdk-latest mvn clean compile test-compile --batch-mode
276286 - cd ../its/autoscan
277- - mvn clean package --batch-mode --errors --show-version --activate-profiles it-autoscan -Dsonar.runtimeVersion=LATEST_RELEASE[25.1] -Dmaven.test.redirectTestOutputToFile=false -Dparallel=methods -DuseUnlimitedThreads=true
287+ - mvn clean package --batch-mode --errors --show-version --activate-profiles it-autoscan -Dsonar.runtimeVersion=LATEST_RELEASE -Dmaven.test.redirectTestOutputToFile=false -Dparallel=methods -DuseUnlimitedThreads=true
278288 cleanup_before_cache_script : cleanup_maven_repository
279289 on_failure :
280290 actual_artifacts :
@@ -283,18 +293,17 @@ autoscan_task:
283293promote_task :
284294 depends_on :
285295 - build
296+ - sonar_shadow_scan_and_issue_replication
286297 - test_analyze
287298 - qa_os_win
288299 - sanity
289300 - ruling
290301 - ruling_win
291302 - plugin_qa
292- - ws_scan
293303 - autoscan
294304 << : *ONLY_SONARSOURCE_QA
295305 eks_container :
296- << : *CONTAINER_DEFINITION
297- image : ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
306+ << : *CONTAINER_WITH_DOCKER_DEFINITION
298307 cpu : 2
299308 memory : 1G
300309 env :
0 commit comments