You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.cirrus.yml 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  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[e3d98fa0ecceb015e9803d47f78c3040f5a710d678a631107635d69f650d4e53ecaf2e2334cc1fe0c47037ec915dcda0]
  21. # to trigger docs deployment
  22. BUDDY_WORKS_TOKEN: ENCRYPTED[9ba648f3167b6f0c0befbba2f816bfffd53260fef06fb0fe8bba0a19ae4808c8b1567c5dcee2a2ee5299a5969058f495]
  23. ELASTIC_PWD: ENCRYPTED[debf2b6e0301ab050d64110186915c8f093d4bc71c034440d2b92a565d7b56d8213420850674d3a8cfd062f47a09cca5]
  24. auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH !=~ 'branch.*'
  25. only_nightly_depending_on_build_template: &ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  26. depends_on: build
  27. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  28. # this task on your branch
  29. only_if: $CIRRUS_BRANCH == "branch-nightly-build"
  30. only_default_depending_on_build_template: &ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  31. depends_on: build
  32. only_if: >-
  33. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  34. $CIRRUS_BRANCH != "public_master" &&
  35. $CIRRUS_BRANCH != "branch-nightly-build" &&
  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. node_modules_cache_template: &NODE_MODULES_CACHE_TEMPLATE
  77. node_modules_cache:
  78. folder: "**/node_modules"
  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. build_task:
  87. <<: *NODE_MODULES_CACHE_TEMPLATE
  88. only_if: >-
  89. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  90. $CIRRUS_BRANCH != "public_master" &&
  91. $CIRRUS_CRON == ""
  92. timeout_in: 90m
  93. gke_container:
  94. <<: *GKE_CONTAINER_TEMPLATE
  95. cpu: 4
  96. memory: 7Gb
  97. env:
  98. # No need to clone the full history.
  99. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  100. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  101. CIRRUS_CLONE_DEPTH: 50
  102. ORG_GRADLE_PROJECT_signingKey: ENCRYPTED[!cc216dfe592f79db8006f2a591f8f98b40aa2b078e92025623594976fd32f6864c1e6b6ba74b50647f608e2418e6c336!]
  103. ORG_GRADLE_PROJECT_signingPassword: ENCRYPTED[!314a8fc344f45e462dd5e8dccd741d7562283a825e78ebca27d4ae9db8e65ce618e7f6aece386b2782a5abe5171467bd!]
  104. ORG_GRADLE_PROJECT_signingKeyId: 0x7DCD4258
  105. elasticsearch_distribution_cache:
  106. folder: sonar-application/build/elasticsearch-**.tar.gz
  107. script:
  108. - ./private/cirrus/cirrus-build.sh
  109. on_failure:
  110. reports_artifacts:
  111. path: "**/build/reports/**/*"
  112. validate_task:
  113. <<: *ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  114. <<: *NODE_MODULES_CACHE_TEMPLATE
  115. timeout_in: 90m
  116. gke_container:
  117. <<: *GKE_CONTAINER_TEMPLATE
  118. cpu: 6.5
  119. memory: 16Gb
  120. additional_containers:
  121. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  122. script:
  123. - ./private/cirrus/cirrus-validate.sh postgres106
  124. on_failure:
  125. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  126. yarn_check-ci_task:
  127. <<: *ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  128. <<: *NODE_MODULES_CACHE_TEMPLATE
  129. timeout_in: 90m
  130. gke_container:
  131. <<: *GKE_CONTAINER_TEMPLATE
  132. cpu: 4
  133. memory: 8Gb
  134. script: |
  135. ./private/cirrus/cirrus-env.sh YARN
  136. gradle yarn_check-ci
  137. on_failure:
  138. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  139. qa_task:
  140. <<: *ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  141. gke_container:
  142. <<: *GKE_CONTAINER_TEMPLATE
  143. cpu: 3
  144. memory: 7Gb
  145. additional_containers:
  146. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  147. env:
  148. # No need to clone the full history.
  149. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  150. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  151. CIRRUS_CLONE_DEPTH: 50
  152. matrix:
  153. - QA_CATEGORY: Cat1
  154. - QA_CATEGORY: Cat2
  155. - QA_CATEGORY: Cat3
  156. - QA_CATEGORY: Cat4
  157. - QA_CATEGORY: Cat5
  158. - QA_CATEGORY: Cat6
  159. - QA_CATEGORY: Cat7
  160. - QA_CATEGORY: Authentication
  161. - QA_CATEGORY: Gov
  162. - QA_CATEGORY: Dev
  163. - QA_CATEGORY: License
  164. - QA_CATEGORY: Branch
  165. - QA_CATEGORY: Upgrade
  166. script:
  167. - ./private/cirrus/cirrus-qa.sh postgres106
  168. on_failure:
  169. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  170. qa_bitbucket_task:
  171. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  172. gke_container:
  173. <<: *GKE_CONTAINER_TEMPLATE
  174. cpu: 3
  175. memory: 7Gb
  176. additional_containers:
  177. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  178. maven_cache:
  179. folder: ~/.m2
  180. env:
  181. # No need to clone the full history.
  182. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  183. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  184. CIRRUS_CLONE_DEPTH: 50
  185. QA_CATEGORY: BITBUCKET
  186. matrix:
  187. - name: qa_bitbucket_5.15.0
  188. bitbucket_background_script: ./private/cirrus/cirrus-start-bitbucket.sh 5.15.0
  189. - name: qa_bitbucket_latest
  190. bitbucket_background_script: ./private/cirrus/cirrus-start-bitbucket.sh LATEST
  191. 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
  192. script:
  193. - ./private/cirrus/cirrus-qa.sh postgres106
  194. on_failure:
  195. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  196. qa_bitbucket_cloud_task:
  197. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  198. gke_container:
  199. <<: *GKE_CONTAINER_TEMPLATE
  200. cpu: 2.4
  201. memory: 5Gb
  202. env:
  203. # No need to clone the full history.
  204. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  205. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  206. CIRRUS_CLONE_DEPTH: 50
  207. QA_CATEGORY: BITBUCKET_CLOUD
  208. BBC_CLIENT_ID: ENCRYPTED[f1c2c57d5f02885345b3db5776a3b28f5dbcc89723809f73ad05ada903ece9584f1dfe61b026c10eabd72c75d1258bac]
  209. BBC_CLIENT_SECRET: ENCRYPTED[39cc89ce4695c243fd688e687879bd473a60882fd30ba8613d6697e5d2b04e2017c68cae3a9a7ed9704f69c52bf229ee]
  210. BBC_READ_REPOS_APP_PASSWORD: ENCRYPTED[d33b02d02987e188b5cec2a14f6ddd04d1fcac39ed5d6ced08891fc562ebb6721c9fbf307c0eba81df78c83f75b3c27c]
  211. BBC_USERNAME: ENCRYPTED[f0af9be9d2fbaa55fbf69e4fce706ebc9131e0dc22cf8bce5d7ab2e0c2b57aff3ddbf6b3b77166e803a6000276256cea]
  212. gradle_cache:
  213. folder: ~/.gradle/caches
  214. script:
  215. - ./private/cirrus/cirrus-qa.sh h2
  216. cleanup_before_cache_script:
  217. - ./private/cirrus/cleanup-gradle-cache.sh
  218. on_failure:
  219. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  220. qa_ha_task:
  221. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  222. gke_container:
  223. <<: *GKE_CONTAINER_TEMPLATE
  224. cpu: 2.4
  225. memory: 10Gb
  226. additional_containers:
  227. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  228. env:
  229. # No need to clone the full history.
  230. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  231. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  232. CIRRUS_CLONE_DEPTH: 50
  233. QA_CATEGORY: HA
  234. gradle_cache:
  235. folder: ~/.gradle/caches
  236. script:
  237. - ./private/cirrus/cirrus-qa.sh postgres106
  238. cleanup_before_cache_script:
  239. - ./private/cirrus/cleanup-gradle-cache.sh
  240. on_failure:
  241. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  242. docker_gitlab_container_build_task:
  243. only_if: $CIRRUS_BRANCH == "branch-nightly-build"
  244. gce_instance:
  245. image_project: sonarqube-team
  246. image_family: docker-builder
  247. zone: us-central1-a
  248. preemptible: true
  249. disk: 10
  250. cpu: 4
  251. memory: 8G
  252. env:
  253. CIRRUS_CLONE_DEPTH: 3
  254. matrix:
  255. - GITLAB_TAG: latest
  256. - GITLAB_TAG: 11.7.0-ce.0
  257. build_script:
  258. - docker pull "us.gcr.io/sonarqube-team/sq-gitlab:${GITLAB_TAG}" || true
  259. - 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/
  260. - docker push "us.gcr.io/sonarqube-team/sq-gitlab:${GITLAB_TAG}"
  261. # 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.
  262. qa_gitlab_task:
  263. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  264. depends_on:
  265. - build
  266. - docker_gitlab_container_build
  267. gke_container:
  268. <<: *GKE_CONTAINER_TEMPLATE
  269. cpu: 2.4
  270. memory: 5Gb
  271. use_in_memory_disk: true
  272. additional_containers:
  273. - name: gitlab
  274. ports:
  275. - 80
  276. - 443
  277. cpu: 2
  278. memory: 5Gb
  279. matrix:
  280. - image: us.gcr.io/sonarqube-team/sq-gitlab:latest
  281. - image: us.gcr.io/sonarqube-team/sq-gitlab:11.7.0-ce.0
  282. env:
  283. # No need to clone the full history.
  284. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  285. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  286. CIRRUS_CLONE_DEPTH: 50
  287. QA_CATEGORY: GITLAB
  288. gradle_cache:
  289. folder: ~/.gradle/caches
  290. script:
  291. - ./private/cirrus/cirrus-qa.sh h2
  292. cleanup_before_cache_script:
  293. - ./private/cirrus/cleanup-gradle-cache.sh
  294. on_failure:
  295. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  296. # Azure QA is executed in a dedicated task in order to not slow down the pipeline.
  297. qa_azure_task:
  298. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  299. gke_container:
  300. <<: *GKE_CONTAINER_TEMPLATE
  301. cpu: 2.4
  302. memory: 5Gb
  303. env:
  304. # No need to clone the full history.
  305. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  306. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  307. CIRRUS_CLONE_DEPTH: 50
  308. QA_CATEGORY: AZURE
  309. AZURE_USERNAME_LOGIN: ENCRYPTED[dcdf19769c1501408ebc22670c76d5e375cd739de2df5dfa3f215aa795296dfb257dbbcbe9bdfd33135feb04421fea1f]
  310. AZURE_CODE_READ_AND_WRITE_TOKEN: ENCRYPTED[eddc3448b40e72310f24f21241bdc1243860139d1a5aad593b016baedf03e4bba3f9e3d8d9f6329fe3b587966a8112d2]
  311. AZURE_FULL_ACCESS_TOKEN: ENCRYPTED[58779d6588e2e10d1b6f98fcc58a46957f8ef3a18e29d79abc6aa8d69ea55c23d8708e1f1af626464d309b1c7c087985]
  312. gradle_cache:
  313. folder: ~/.gradle/caches
  314. script:
  315. - ./private/cirrus/cirrus-qa.sh h2
  316. cleanup_before_cache_script:
  317. - ./private/cirrus/cleanup-gradle-cache.sh
  318. on_failure:
  319. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  320. # SAML QA is executed in a dedicated task in order to not slow down the pipeline, as a Keycloak server docker image is required.
  321. qa_saml_task:
  322. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  323. gke_container:
  324. <<: *GKE_CONTAINER_TEMPLATE
  325. cpu: 2.4
  326. memory: 10Gb
  327. additional_containers:
  328. - name: keycloak
  329. image: jboss/keycloak:7.0.0
  330. port: 8080
  331. cpu: 1
  332. memory: 1Gb
  333. env:
  334. KEYCLOAK_USER: admin
  335. KEYCLOAK_PASSWORD: admin
  336. env:
  337. # No need to clone the full history.
  338. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  339. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  340. CIRRUS_CLONE_DEPTH: 50
  341. QA_CATEGORY: SAML
  342. gradle_cache:
  343. folder: ~/.gradle/caches
  344. script:
  345. - ./private/cirrus/cirrus-qa.sh h2
  346. cleanup_before_cache_script:
  347. - ./private/cirrus/cleanup-gradle-cache.sh
  348. on_failure:
  349. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  350. # 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.
  351. qa_ldap_task:
  352. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  353. gke_container:
  354. <<: *GKE_CONTAINER_TEMPLATE
  355. cpu: 2.4
  356. memory: 10Gb
  357. env:
  358. # No need to clone the full history.
  359. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  360. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  361. CIRRUS_CLONE_DEPTH: 50
  362. QA_CATEGORY: LDAP
  363. gradle_cache:
  364. folder: ~/.gradle/caches
  365. script:
  366. - ./private/cirrus/cirrus-qa.sh h2
  367. cleanup_before_cache_script:
  368. - ./private/cirrus/cleanup-gradle-cache.sh
  369. on_failure:
  370. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  371. promote_task:
  372. <<: *ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  373. depends_on:
  374. - build
  375. - validate
  376. - qa
  377. - qa_saml
  378. - qa_ldap
  379. gke_container:
  380. <<: *GKE_CONTAINER_TEMPLATE
  381. stateful: true
  382. env:
  383. # No need to clone the full history.
  384. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  385. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  386. CIRRUS_CLONE_DEPTH: 50
  387. script:
  388. - ./private/cirrus/cirrus-promote.sh
  389. deploy_docs_task:
  390. depends_on: promote
  391. only_if: $CIRRUS_BRANCH == 'dogfood-on-next'
  392. gke_container:
  393. <<: *GKE_CONTAINER_TEMPLATE
  394. env:
  395. # No need to clone the full history.
  396. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  397. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  398. CIRRUS_CLONE_DEPTH: 50
  399. script:
  400. - ./private/cirrus/cirrus-trigger-deploy-docs.sh
  401. sql_mssql2017_task:
  402. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  403. gke_container:
  404. <<: *GKE_CONTAINER_TEMPLATE
  405. memory: 5Gb
  406. additional_containers:
  407. - name: mssql
  408. image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
  409. port: 1433
  410. cpu: 2
  411. memory: 5Gb
  412. env:
  413. MSSQL_PID: Developer # this is the default edition
  414. ACCEPT_EULA: Y
  415. SA_PASSWORD: sonarqube!1
  416. script:
  417. - ./private/cirrus/cirrus-db-unit-test.sh mssql2017
  418. on_failure:
  419. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  420. # this is the oldest compatible version of PostgreSQL
  421. sql_postgres96_task:
  422. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  423. gke_container:
  424. <<: *GKE_CONTAINER_TEMPLATE
  425. memory: 5Gb
  426. additional_containers:
  427. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  428. image: postgres:9.6
  429. script:
  430. - ./private/cirrus/cirrus-db-unit-test.sh postgres96
  431. on_failure:
  432. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  433. sql_oracle12_task:
  434. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  435. gke_container:
  436. <<: *GKE_CONTAINER_TEMPLATE
  437. memory: 5Gb
  438. additional_containers:
  439. - <<: *ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  440. script:
  441. - ./private/cirrus/cirrus-db-unit-test.sh oracle12
  442. on_failure:
  443. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  444. upgd_mssql2019_task:
  445. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  446. gke_container:
  447. <<: *GKE_CONTAINER_TEMPLATE
  448. cpu: 1.5
  449. memory: 6Gb
  450. additional_containers:
  451. - name: mssql
  452. image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
  453. port: 1433
  454. cpu: 2
  455. memory: 5Gb
  456. env:
  457. MSSQL_PID: Developer # this is the default edition
  458. ACCEPT_EULA: Y
  459. SA_PASSWORD: sonarqube!1
  460. env:
  461. # No need to clone the full history.
  462. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  463. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  464. CIRRUS_CLONE_DEPTH: 50
  465. matrix:
  466. QA_CATEGORY: Upgrade
  467. script:
  468. - ./private/cirrus/cirrus-qa.sh mssql2017
  469. on_failure:
  470. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  471. upgd_oracle12_task:
  472. <<: *ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  473. gke_container:
  474. <<: *GKE_CONTAINER_TEMPLATE
  475. cpu: 1.5
  476. memory: 6Gb
  477. additional_containers:
  478. - <<: *ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  479. env:
  480. # No need to clone the full history.
  481. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  482. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  483. CIRRUS_CLONE_DEPTH: 50
  484. matrix:
  485. QA_CATEGORY: Upgrade
  486. script:
  487. - ./private/cirrus/cirrus-qa.sh oracle12
  488. on_failure:
  489. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  490. # Software Composition Analysis (SCA): check potential vulnerabilities in dependencies.
  491. # Note that license compliance of dependencies is not checked for now.
  492. owasp_check_task:
  493. only_if: >-
  494. $CIRRUS_CRON == "nightly" ||
  495. $CIRRUS_CRON == "weekly-latest" ||
  496. $CIRRUS_CRON == "weekly-lts" ||
  497. changesInclude('private/owasp/*.xml')
  498. timeout_in: 30m
  499. gke_container:
  500. <<: *GKE_CONTAINER_TEMPLATE
  501. cpu: 1.7
  502. memory: 4Gb
  503. environment:
  504. # No need to clone the full history.
  505. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  506. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  507. CIRRUS_CLONE_DEPTH: 50
  508. SLACK_WEBHOOK_SQ: ENCRYPTED[dec8e4350cbea3b94d63098558bcb3ae9e79b71c2b6286fcfb9eb80c0953b6448b10f7271b07b5e75e52f362c25d7a8f]
  509. script:
  510. - gradle dependencyCheckAggregate
  511. on_failure:
  512. slack_notification_script:
  513. - ./private/cirrus/cirrus-owasp-notification.sh
  514. always:
  515. reports_artifacts:
  516. path: "build/reports/*"