Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. # content of service-account-credentials.json, used to access to Google Cloud Platform
  2. gcp_credentials: ENCRYPTED[!e5f7207bd8d02d383733bef47e18296ac32e3b7d22eb480354e8dd8fdc0004be45a8a4e72c797bd66ee94eb3340fa363!]
  3. env:
  4. GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+PrintFlagsFinal -XshowSettings:vm -XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockExperimentalVMOptions -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF8 -Duser.language=en -Duser.country=US"
  5. # to be replaced by other credentials
  6. ARTIFACTORY_PRIVATE_USERNAME: repox-private-reader
  7. ARTIFACTORY_PRIVATE_PASSWORD: ENCRYPTED[!35ca4446564213d4fd2d1a96e42a871d5de6e6aac4e1dd3e89342892a60a2badf74a966bcc8e885e9c9d09a775ffe4c0!]
  8. ARTIFACTORY_DEPLOY_USERNAME: repox-qa-deployer
  9. ARTIFACTORY_DEPLOY_PASSWORD: ENCRYPTED[!d484e19f33c9ce63b165f70e414a33b1ac6c215a126791aacbf8059626caf0fd8a78e999a20af5c1a4ba01c0b0247921!]
  10. ARTIFACTORY_API_KEY: ENCRYPTED[60f92cec4bf8446867dce41fe8dc77457f10065b82a24bfa3924d496aa1c14b89b531b86c3a34274abb12cf9a4cb36c4]
  11. # download licenses for testing commercial editions
  12. GITHUB_TOKEN: ENCRYPTED[!f272985ea5b49b3cf9c414b98de6a8e9096be47bfcee52f33311ba3131a2af637c1b956f49585b7757dd84b7c030233a!]
  13. # use a permanent GitHub access token to perform a clone (by default CirrusCI uses a temporary one)
  14. CIRRUS_REPO_CLONE_TOKEN: ENCRYPTED[f20fee6519296187a473964e60afb08a1bbdc889a624fad0297b41a21d8697f8d2da4d2d245194ade630dcf46b4b581e]
  15. # notifications to burgr
  16. BURGR_URL: ENCRYPTED[24fba83587c1e9ed372b6cfdf12e4739ebe3b6e5b5082f1a2a742e840dd2e4b61fd5e281bf2632b22b3ad346c650c05c]
  17. BURGR_USERNAME: ENCRYPTED[cf7bfb936025fb763013bbfef0ab5723c0d9b53f135d79af36f9defa933f4b5fc72842bd83a97ce9b614503c1b77e6da]
  18. BURGR_PASSWORD: ENCRYPTED[bc554fc6a06c9f14cc9924cefad0a69e962a905b6d1609fc9357d458b45fc52ac74c960ad9c7382a0691433fa9dcd483]
  19. # analysis on next.sonarqube.com
  20. SONARQUBE_NEXT_TOKEN: ENCRYPTED[!0d599f9fb1613db33388821ca04af23f090729902b4421ad0a53cea8393d1e9039f2e47d65a246781b0e2c3718c172a1!]
  21. # to trigger docs deployment
  22. BUDDY_WORKS_TOKEN: ENCRYPTED[9ba648f3167b6f0c0befbba2f816bfffd53260fef06fb0fe8bba0a19ae4808c8b1567c5dcee2a2ee5299a5969058f495]
  23. ELASTIC_PWD: ENCRYPTED[78c127034b9f06bc1b5ad7a520de2da094f3eaf1dcb35f12b0f178fa90ce2fd157bd6f9feece9bf3a54b4e3805bc39fb]
  24. CIRRUS_LOG_TIMESTAMP: true
  25. auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH !=~ 'branch.*' && $CIRRUS_BRANCH != 'dogfood-on-next'
  26. only_nightly_depending_on_build_template: &ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  27. depends_on: build
  28. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  29. # this task on your branch
  30. only_if: $CIRRUS_BRANCH == "branch-nightly-build"
  31. only_default_depending_on_build_template: &ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  32. depends_on: build
  33. only_if: >-
  34. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  35. $CIRRUS_BRANCH != "public_master" &&
  36. $CIRRUS_CRON == ""
  37. docker_build_container_template: &GKE_CONTAINER_TEMPLATE
  38. dockerfile: private/docker/Dockerfile-build
  39. builder_image_project: sonarqube-team
  40. builder_image_name: docker-builder-v20200915
  41. cluster_name: cirrus-ci-cluster
  42. zone: us-central1-a
  43. namespace: default
  44. cpu: 1
  45. memory: 1Gb
  46. oracle_additional_container_template: &ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  47. name: oracle
  48. image: us.gcr.io/sonarqube-team/oracle12:0.0.1 # see https://github.com/SonarSource/vms/blob/master/docker/README.md#oracle-12c to build it
  49. port: 1521
  50. cpu: 2
  51. memory: 5Gb
  52. env:
  53. ORACLE_PWD: sonarqube
  54. postgres_additional_container_template: &POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  55. name: postgres
  56. image: postgres:13.2
  57. port: 5432
  58. cpu: 1
  59. memory: 1Gb
  60. env:
  61. POSTGRES_USER: postgres
  62. POSTGRES_PASSWORD: postgres
  63. reports_junit_on_failure_template: &REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  64. jest_junit_cleanup_script: >
  65. find . -type f -wholename "**/build/test-results/test-jest/junit.xml" -exec
  66. xmlstarlet edit --inplace --delete '//testsuite[@errors=0 and @failures=0]' {} \;
  67. reports_artifacts:
  68. path: "**/build/reports/**/*"
  69. junit_artifacts:
  70. path: "**/build/test-results/**/*.xml"
  71. format: junit
  72. screenshots_on_failure_template: &REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  73. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  74. screenshots_artifacts:
  75. path: "**/build/screenshots/**/*"
  76. yarn_cache_template: &YARN_CACHE_TEMPLATE
  77. yarn_cache:
  78. folder: "~/.yarn/berry/cache"
  79. fingerprint_script: |
  80. cat \
  81. server/sonar-web/yarn.lock \
  82. server/sonar-docs/yarn.lock \
  83. private/core-extension-governance/yarn.lock \
  84. private/core-extension-license/yarn.lock \
  85. private/core-extension-securityreport/yarn.lock
  86. custom_clone_script_template: &CUSTOM_CLONE_SCRIPT_TEMPLATE
  87. clone_script: |
  88. git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR --depth=1
  89. git fetch origin $CIRRUS_CHANGE_IN_REPO --depth=1
  90. git reset --hard $CIRRUS_CHANGE_IN_REPO
  91. profile_artifacts_template: &PROFILE_ARTIFACTS_TEMPLATE
  92. profile_artifacts:
  93. path: "**/build/reports/profile/**/*"
  94. build_task:
  95. <<: *YARN_CACHE_TEMPLATE
  96. only_if: >-
  97. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  98. $CIRRUS_BRANCH != "public_master" &&
  99. $CIRRUS_CRON == ""
  100. timeout_in: 90m
  101. gke_container:
  102. <<: *GKE_CONTAINER_TEMPLATE
  103. cpu: 7.5
  104. memory: 8Gb
  105. env:
  106. # No need to clone the full history.
  107. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  108. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  109. CIRRUS_CLONE_DEPTH: 50
  110. ORG_GRADLE_PROJECT_signingKey: ENCRYPTED[!cc216dfe592f79db8006f2a591f8f98b40aa2b078e92025623594976fd32f6864c1e6b6ba74b50647f608e2418e6c336!]
  111. ORG_GRADLE_PROJECT_signingPassword: ENCRYPTED[!314a8fc344f45e462dd5e8dccd741d7562283a825e78ebca27d4ae9db8e65ce618e7f6aece386b2782a5abe5171467bd!]
  112. ORG_GRADLE_PROJECT_signingKeyId: 0x7DCD4258
  113. elasticsearch_distribution_cache:
  114. folder: sonar-application/build/elasticsearch-**.tar.gz
  115. script:
  116. - ./private/cirrus/cirrus-build.sh
  117. on_failure:
  118. reports_artifacts:
  119. path: "**/build/reports/**/*"
  120. always:
  121. <<: *PROFILE_ARTIFACTS_TEMPLATE
  122. validate_task:
  123. <<: *ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  124. <<: *YARN_CACHE_TEMPLATE
  125. timeout_in: 90m
  126. gke_container:
  127. <<: *GKE_CONTAINER_TEMPLATE
  128. cpu: 6.5
  129. memory: 28Gb
  130. additional_containers:
  131. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  132. script:
  133. - ./private/cirrus/cirrus-validate.sh postgres106
  134. on_failure:
  135. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  136. always:
  137. <<: *PROFILE_ARTIFACTS_TEMPLATE
  138. yarn_check-ci_task:
  139. <<: *ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  140. <<: *YARN_CACHE_TEMPLATE
  141. timeout_in: 90m
  142. gke_container:
  143. <<: *GKE_CONTAINER_TEMPLATE
  144. cpu: 4
  145. memory: 8Gb
  146. script: |
  147. ./private/cirrus/cirrus-env.sh YARN
  148. gradle yarn_check-ci --profile
  149. on_failure:
  150. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  151. always:
  152. <<: *PROFILE_ARTIFACTS_TEMPLATE
  153. qa_task:
  154. <<: *ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  155. gke_container:
  156. <<: *GKE_CONTAINER_TEMPLATE
  157. cpu: 3
  158. memory: 7Gb
  159. additional_containers:
  160. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  161. env:
  162. # No need to clone the full history.
  163. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  164. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  165. CIRRUS_CLONE_DEPTH: 50
  166. matrix:
  167. - QA_CATEGORY: Cat1
  168. - QA_CATEGORY: Cat2
  169. - QA_CATEGORY: Cat3
  170. - QA_CATEGORY: Cat4
  171. - QA_CATEGORY: Cat5
  172. - QA_CATEGORY: Cat6
  173. - QA_CATEGORY: Cat7
  174. - QA_CATEGORY: Authentication
  175. - QA_CATEGORY: Gov
  176. - QA_CATEGORY: Dev
  177. - QA_CATEGORY: License
  178. - QA_CATEGORY: Branch
  179. - QA_CATEGORY: Upgrade
  180. script:
  181. - ./private/cirrus/cirrus-qa.sh postgres106
  182. on_failure:
  183. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  184. task: #bitbucket
  185. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  186. gke_container:
  187. <<: *GKE_CONTAINER_TEMPLATE
  188. cpu: 3
  189. memory: 7Gb
  190. additional_containers:
  191. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  192. maven_cache:
  193. folder: ~/.m2
  194. env:
  195. # No need to clone the full history.
  196. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  197. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  198. CIRRUS_CLONE_DEPTH: 50
  199. QA_CATEGORY: BITBUCKET
  200. matrix:
  201. - name: qa_bitbucket_5.15.0
  202. bitbucket_background_script: ./private/cirrus/cirrus-start-bitbucket.sh 5.15.0
  203. - name: qa_bitbucket_latest
  204. bitbucket_background_script: ./private/cirrus/cirrus-start-bitbucket.sh LATEST
  205. wait_for_bitbucket_to_boot_script: secs=3600; endTime=$(( $(date +%s) + secs )); while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:7990/bitbucket/status)" != "200" ]] || [ $(date +%s) -gt $endTime ]; do sleep 5; done
  206. script:
  207. - ./private/cirrus/cirrus-qa.sh postgres106
  208. on_failure:
  209. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  210. qa_bb_cloud_task:
  211. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  212. gke_container:
  213. <<: *GKE_CONTAINER_TEMPLATE
  214. cpu: 2.4
  215. memory: 5Gb
  216. env:
  217. # No need to clone the full history.
  218. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  219. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  220. CIRRUS_CLONE_DEPTH: 50
  221. QA_CATEGORY: BITBUCKET_CLOUD
  222. BBC_CLIENT_ID: ENCRYPTED[f1c2c57d5f02885345b3db5776a3b28f5dbcc89723809f73ad05ada903ece9584f1dfe61b026c10eabd72c75d1258bac]
  223. BBC_CLIENT_SECRET: ENCRYPTED[39cc89ce4695c243fd688e687879bd473a60882fd30ba8613d6697e5d2b04e2017c68cae3a9a7ed9704f69c52bf229ee]
  224. BBC_READ_REPOS_APP_PASSWORD: ENCRYPTED[d33b02d02987e188b5cec2a14f6ddd04d1fcac39ed5d6ced08891fc562ebb6721c9fbf307c0eba81df78c83f75b3c27c]
  225. BBC_USERNAME: ENCRYPTED[f0af9be9d2fbaa55fbf69e4fce706ebc9131e0dc22cf8bce5d7ab2e0c2b57aff3ddbf6b3b77166e803a6000276256cea]
  226. gradle_cache:
  227. folder: ~/.gradle/caches
  228. script:
  229. - ./private/cirrus/cirrus-qa.sh h2
  230. cleanup_before_cache_script:
  231. - ./private/cirrus/cleanup-gradle-cache.sh
  232. on_failure:
  233. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  234. qa_ha_task:
  235. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  236. gke_container:
  237. <<: *GKE_CONTAINER_TEMPLATE
  238. cpu: 2.4
  239. memory: 10Gb
  240. additional_containers:
  241. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  242. env:
  243. # No need to clone the full history.
  244. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  245. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  246. CIRRUS_CLONE_DEPTH: 50
  247. QA_CATEGORY: HA
  248. gradle_cache:
  249. folder: ~/.gradle/caches
  250. script:
  251. - ./private/cirrus/cirrus-qa.sh postgres106
  252. cleanup_before_cache_script:
  253. - ./private/cirrus/cleanup-gradle-cache.sh
  254. on_failure:
  255. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  256. docker_gitlab_container_build_task:
  257. only_if: $CIRRUS_BRANCH == "branch-nightly-build"
  258. gce_instance:
  259. image_project: sonarqube-team
  260. image_family: docker-builder
  261. zone: us-central1-a
  262. preemptible: true
  263. disk: 10
  264. cpu: 4
  265. memory: 8G
  266. env:
  267. CIRRUS_CLONE_DEPTH: 3
  268. matrix:
  269. - GITLAB_TAG: latest
  270. - GITLAB_TAG: 11.7.0-ce.0
  271. build_script:
  272. - docker pull "us.gcr.io/sonarqube-team/sq-gitlab:${GITLAB_TAG}" || true
  273. - docker build --build-arg "GITLAB_TAG=${GITLAB_TAG}" --cache-from "us.gcr.io/sonarqube-team/sq-gitlab:${GITLAB_TAG}" -t "us.gcr.io/sonarqube-team/sq-gitlab:${GITLAB_TAG}" private/docker/gitlab/
  274. - docker push "us.gcr.io/sonarqube-team/sq-gitlab:${GITLAB_TAG}"
  275. # GitLab QA is executed in a dedicated task in order to not slow down the pipeline, as a GitLab on-prem server docker image is required.
  276. qa_gitlab_task:
  277. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  278. depends_on:
  279. - build
  280. - docker_gitlab_container_build
  281. gke_container:
  282. <<: *GKE_CONTAINER_TEMPLATE
  283. cpu: 2.4
  284. memory: 5Gb
  285. use_in_memory_disk: true
  286. additional_containers:
  287. - name: gitlab
  288. ports:
  289. - 80
  290. - 443
  291. cpu: 2
  292. memory: 5Gb
  293. matrix:
  294. - image: us.gcr.io/sonarqube-team/sq-gitlab:latest
  295. - image: us.gcr.io/sonarqube-team/sq-gitlab:11.7.0-ce.0
  296. env:
  297. # No need to clone the full history.
  298. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  299. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  300. CIRRUS_CLONE_DEPTH: 50
  301. QA_CATEGORY: GITLAB
  302. gradle_cache:
  303. folder: ~/.gradle/caches
  304. script:
  305. - ./private/cirrus/cirrus-qa.sh h2
  306. cleanup_before_cache_script:
  307. - ./private/cirrus/cleanup-gradle-cache.sh
  308. on_failure:
  309. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  310. # Azure QA is executed in a dedicated task in order to not slow down the pipeline.
  311. qa_azure_task:
  312. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  313. gke_container:
  314. <<: *GKE_CONTAINER_TEMPLATE
  315. cpu: 2.4
  316. memory: 5Gb
  317. env:
  318. # No need to clone the full history.
  319. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  320. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  321. CIRRUS_CLONE_DEPTH: 50
  322. QA_CATEGORY: AZURE
  323. AZURE_USERNAME_LOGIN: ENCRYPTED[dcdf19769c1501408ebc22670c76d5e375cd739de2df5dfa3f215aa795296dfb257dbbcbe9bdfd33135feb04421fea1f]
  324. AZURE_CODE_READ_AND_WRITE_TOKEN: ENCRYPTED[eddc3448b40e72310f24f21241bdc1243860139d1a5aad593b016baedf03e4bba3f9e3d8d9f6329fe3b587966a8112d2]
  325. AZURE_FULL_ACCESS_TOKEN: ENCRYPTED[58779d6588e2e10d1b6f98fcc58a46957f8ef3a18e29d79abc6aa8d69ea55c23d8708e1f1af626464d309b1c7c087985]
  326. gradle_cache:
  327. folder: ~/.gradle/caches
  328. script:
  329. - ./private/cirrus/cirrus-qa.sh h2
  330. cleanup_before_cache_script:
  331. - ./private/cirrus/cleanup-gradle-cache.sh
  332. on_failure:
  333. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  334. # SAML QA is executed in a dedicated task in order to not slow down the pipeline, as a Keycloak server docker image is required.
  335. qa_saml_task:
  336. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  337. gke_container:
  338. <<: *GKE_CONTAINER_TEMPLATE
  339. cpu: 2.4
  340. memory: 10Gb
  341. additional_containers:
  342. - name: keycloak
  343. image: jboss/keycloak:7.0.0
  344. port: 8080
  345. cpu: 1
  346. memory: 1Gb
  347. env:
  348. KEYCLOAK_USER: admin
  349. KEYCLOAK_PASSWORD: admin
  350. env:
  351. # No need to clone the full history.
  352. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  353. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  354. CIRRUS_CLONE_DEPTH: 50
  355. QA_CATEGORY: SAML
  356. gradle_cache:
  357. folder: ~/.gradle/caches
  358. script:
  359. - ./private/cirrus/cirrus-qa.sh h2
  360. cleanup_before_cache_script:
  361. - ./private/cirrus/cleanup-gradle-cache.sh
  362. on_failure:
  363. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  364. # LDAP QA is executed in a dedicated task in order to not slow down the pipeline, as a LDAP server and SonarQube server are re-started on each test.
  365. qa_ldap_task:
  366. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  367. gke_container:
  368. <<: *GKE_CONTAINER_TEMPLATE
  369. cpu: 2.4
  370. memory: 10Gb
  371. env:
  372. # No need to clone the full history.
  373. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  374. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  375. CIRRUS_CLONE_DEPTH: 50
  376. QA_CATEGORY: LDAP
  377. gradle_cache:
  378. folder: ~/.gradle/caches
  379. script:
  380. - ./private/cirrus/cirrus-qa.sh h2
  381. cleanup_before_cache_script:
  382. - ./private/cirrus/cleanup-gradle-cache.sh
  383. on_failure:
  384. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  385. promote_task:
  386. <<: *ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  387. depends_on:
  388. - build
  389. - validate
  390. - qa
  391. - qa_saml
  392. - qa_ldap
  393. gke_container:
  394. <<: *GKE_CONTAINER_TEMPLATE
  395. stateful: true
  396. env:
  397. # No need to clone the full history.
  398. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  399. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  400. CIRRUS_CLONE_DEPTH: 50
  401. script:
  402. - ./private/cirrus/cirrus-promote.sh
  403. deploy_docs_task:
  404. depends_on: promote
  405. skip: true
  406. only_if: $CIRRUS_BRANCH == 'dogfood-on-next'
  407. gke_container:
  408. <<: *GKE_CONTAINER_TEMPLATE
  409. env:
  410. # No need to clone the full history.
  411. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  412. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  413. CIRRUS_CLONE_DEPTH: 50
  414. script:
  415. - ./private/cirrus/cirrus-trigger-deploy-docs.sh
  416. package_docker_task:
  417. depends_on: promote
  418. only_if: $CIRRUS_BRANCH == 'dogfood-on-next'
  419. gce_instance:
  420. image_project: sonarqube-team
  421. image_family: docker-builder
  422. zone: us-central1-a
  423. disk: 10
  424. cpu: 4
  425. memory: 8G
  426. <<: *CUSTOM_CLONE_SCRIPT_TEMPLATE
  427. install_tooling_script:
  428. - ./private/cirrus/cirrus-tooling-for-package-docker.sh
  429. package_script:
  430. - ./private/cirrus/cirrus-package-docker.sh
  431. sql_mssql2017_task:
  432. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  433. gke_container:
  434. <<: *GKE_CONTAINER_TEMPLATE
  435. memory: 5Gb
  436. additional_containers:
  437. - name: mssql
  438. image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
  439. port: 1433
  440. cpu: 2
  441. memory: 5Gb
  442. env:
  443. MSSQL_PID: Developer # this is the default edition
  444. ACCEPT_EULA: Y
  445. SA_PASSWORD: sonarqube!1
  446. script:
  447. - ./private/cirrus/cirrus-db-unit-test.sh mssql2017
  448. on_failure:
  449. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  450. # this is the oldest compatible version of PostgreSQL
  451. sql_postgres96_task:
  452. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  453. gke_container:
  454. <<: *GKE_CONTAINER_TEMPLATE
  455. memory: 5Gb
  456. additional_containers:
  457. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  458. image: postgres:9.6
  459. script:
  460. - ./private/cirrus/cirrus-db-unit-test.sh postgres96
  461. on_failure:
  462. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  463. sql_oracle12_task:
  464. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  465. gke_container:
  466. <<: *GKE_CONTAINER_TEMPLATE
  467. memory: 5Gb
  468. additional_containers:
  469. - <<: *ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  470. script:
  471. - ./private/cirrus/cirrus-db-unit-test.sh oracle12
  472. on_failure:
  473. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  474. upgd_mssql2019_task:
  475. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  476. gke_container:
  477. <<: *GKE_CONTAINER_TEMPLATE
  478. cpu: 1.5
  479. memory: 6Gb
  480. additional_containers:
  481. - name: mssql
  482. image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
  483. port: 1433
  484. cpu: 2
  485. memory: 5Gb
  486. env:
  487. MSSQL_PID: Developer # this is the default edition
  488. ACCEPT_EULA: Y
  489. SA_PASSWORD: sonarqube!1
  490. env:
  491. # No need to clone the full history.
  492. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  493. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  494. CIRRUS_CLONE_DEPTH: 50
  495. matrix:
  496. QA_CATEGORY: Upgrade
  497. script:
  498. - ./private/cirrus/cirrus-qa.sh mssql2017
  499. on_failure:
  500. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  501. upgd_oracle12_task:
  502. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  503. gke_container:
  504. <<: *GKE_CONTAINER_TEMPLATE
  505. cpu: 1.5
  506. memory: 6Gb
  507. additional_containers:
  508. - <<: *ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  509. env:
  510. # No need to clone the full history.
  511. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  512. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  513. CIRRUS_CLONE_DEPTH: 50
  514. matrix:
  515. QA_CATEGORY: Upgrade
  516. script:
  517. - ./private/cirrus/cirrus-qa.sh oracle12
  518. on_failure:
  519. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  520. # Software Composition Analysis (SCA): check potential vulnerabilities in dependencies.
  521. # Note that license compliance of dependencies is not checked for now.
  522. owasp_check_task:
  523. only_if: >-
  524. $CIRRUS_CRON == "nightly" ||
  525. $CIRRUS_CRON == "weekly-latest" ||
  526. $CIRRUS_CRON == "weekly-lts" ||
  527. changesInclude('private/owasp/*.xml')
  528. <<: *YARN_CACHE_TEMPLATE
  529. timeout_in: 30m
  530. gke_container:
  531. <<: *GKE_CONTAINER_TEMPLATE
  532. cpu: 1.7
  533. memory: 4Gb
  534. environment:
  535. # No need to clone the full history.
  536. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  537. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  538. CIRRUS_CLONE_DEPTH: 50
  539. SLACK_WEBHOOK_SQ: ENCRYPTED[dec8e4350cbea3b94d63098558bcb3ae9e79b71c2b6286fcfb9eb80c0953b6448b10f7271b07b5e75e52f362c25d7a8f]
  540. script:
  541. - gradle dependencyCheckAggregate
  542. on_failure:
  543. slack_notification_script:
  544. - ./private/cirrus/cirrus-owasp-notification.sh
  545. always:
  546. reports_artifacts:
  547. path: "build/reports/*"