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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. # content of service-account-credentials.json, used to access to Google Cloud Platform
  2. gcp_credentials: ENCRYPTED[ec86f04ec57d8a7f29ad6b84b41262c9d576abc533485754fdfdb24db103adf0d33ba4ba89a57d29d2549790be5abc72]
  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: ENCRYPTED[c0baa3376daa1e08d602435081d07653799cf34ab09ca92e575f3dc4176bc6cf2ebf87120e83f3aa6804f072013e8e2b]
  7. ARTIFACTORY_PRIVATE_PASSWORD: ENCRYPTED[f13d32d218c3da8008114d2c8857b2956047fbdab2163bbf186b8b89f789f0efa7504f499749a59ad5988c14e5360353]
  8. ARTIFACTORY_DEPLOY_USERNAME: public-qa-deployer
  9. ARTIFACTORY_DEPLOY_PASSWORD: ENCRYPTED[9362d735843b21b375b6e19d91e0de5216e053e229e39e2ce33a0c866306e6e3f9b08db8a0e126ca5e986fea97e975fd]
  10. ARTIFACTORY_DEPLOY_USERNAME_PRIVATE: private-qa-deployer
  11. ARTIFACTORY_DEPLOY_PASSWORD_PRIVATE: ENCRYPTED[61769719e9b775afe103dbee22141eeaa0116b3332eafb993be2a5919ff7bf017cdc519afed07dc6cac8ebbc0846f191]
  12. ARTIFACTORY_API_KEY: ENCRYPTED[d52910db749f2678f43084b18c849486d68fbc02c2f5489c7ee1085c395de9dc7575313a8b348bb5361a693dd782e07e]
  13. # download licenses for testing commercial editions
  14. GITHUB_TOKEN: ENCRYPTED[!f272985ea5b49b3cf9c414b98de6a8e9096be47bfcee52f33311ba3131a2af637c1b956f49585b7757dd84b7c030233a!]
  15. # use a permanent GitHub access token to perform a clone (by default CirrusCI uses a temporary one)
  16. CIRRUS_REPO_CLONE_TOKEN: ENCRYPTED[f20fee6519296187a473964e60afb08a1bbdc889a624fad0297b41a21d8697f8d2da4d2d245194ade630dcf46b4b581e]
  17. # notifications to burgr
  18. BURGR_URL: ENCRYPTED[24fba83587c1e9ed372b6cfdf12e4739ebe3b6e5b5082f1a2a742e840dd2e4b61fd5e281bf2632b22b3ad346c650c05c]
  19. BURGR_USERNAME: ENCRYPTED[cf7bfb936025fb763013bbfef0ab5723c0d9b53f135d79af36f9defa933f4b5fc72842bd83a97ce9b614503c1b77e6da]
  20. BURGR_PASSWORD: ENCRYPTED[bc554fc6a06c9f14cc9924cefad0a69e962a905b6d1609fc9357d458b45fc52ac74c960ad9c7382a0691433fa9dcd483]
  21. # analysis on next.sonarqube.com
  22. SONARQUBE_NEXT_TOKEN: ENCRYPTED[e3d98fa0ecceb015e9803d47f78c3040f5a710d678a631107635d69f650d4e53ecaf2e2334cc1fe0c47037ec915dcda0]
  23. # to trigger docs deployment
  24. BUDDY_WORKS_TOKEN: ENCRYPTED[9ba648f3167b6f0c0befbba2f816bfffd53260fef06fb0fe8bba0a19ae4808c8b1567c5dcee2a2ee5299a5969058f495]
  25. auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH !=~ 'branch.*'
  26. task_only_nightly_depending_on_build_template: &TASK_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. task_only_default_depending_on_build_template: &TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  32. depends_on: build
  33. only_if: >-
  34. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  35. $CIRRUS_BRANCH != "public_master" &&
  36. $CIRRUS_BRANCH != "branch-nightly-build" &&
  37. $CIRRUS_CRON == "" &&
  38. $CIRRUS_CHANGE_MESSAGE !=~ '.*\[update headers\].*'
  39. docker_build_container_template: &GKE_CONTAINER_TEMPLATE
  40. dockerfile: private/docker/Dockerfile-build
  41. builder_image_project: sonarqube-team
  42. builder_image_name: docker-builder-v20200915
  43. cluster_name: cirrus-ci-cluster
  44. zone: us-central1-a
  45. namespace: default
  46. cpu: 1
  47. memory: 1Gb
  48. oracle_additional_container_template: &ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  49. name: oracle
  50. 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
  51. port: 1521
  52. cpu: 2
  53. memory: 5Gb
  54. env:
  55. ORACLE_PWD: sonarqube
  56. postgres_additional_container_template: &POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  57. name: postgres
  58. image: postgres:12.1
  59. port: 5432
  60. cpu: 1
  61. memory: 1Gb
  62. env:
  63. POSTGRES_USER: postgres
  64. POSTGRES_PASSWORD: postgres
  65. reports_junit_on_failure_template: &REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  66. jest_junit_cleanup_script: >
  67. find . -type f -wholename "**/build/test-results/test-jest/junit.xml" -exec
  68. xmlstarlet edit --inplace --delete '//testsuite[@errors=0 and @failures=0]' {} \;
  69. reports_artifacts:
  70. path: "**/build/reports/**/*"
  71. junit_artifacts:
  72. path: "**/build/test-results/**/*.xml"
  73. format: junit
  74. screenshots_on_failure_template: &REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  75. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  76. screenshots_artifacts:
  77. path: "**/build/screenshots/**/*"
  78. node_modules_cache_template: &NODE_MODULES_CACHE_TEMPLATE
  79. node_modules_cache:
  80. folder: "**/node_modules"
  81. fingerprint_script: |
  82. cat \
  83. server/sonar-web/yarn.lock \
  84. server/sonar-docs/yarn.lock \
  85. private/core-extension-governance/yarn.lock \
  86. private/core-extension-license/yarn.lock \
  87. private/core-extension-securityreport/yarn.lock
  88. build_task:
  89. <<: *NODE_MODULES_CACHE_TEMPLATE
  90. only_if: >-
  91. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  92. $CIRRUS_BRANCH != "public_master" &&
  93. $CIRRUS_CRON == ""
  94. timeout_in: 90m
  95. gke_container:
  96. <<: *GKE_CONTAINER_TEMPLATE
  97. cpu: 4
  98. memory: 7Gb
  99. env:
  100. # No need to clone the full history.
  101. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  102. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  103. CIRRUS_CLONE_DEPTH: 50
  104. script:
  105. - ./private/cirrus/cirrus-build.sh
  106. on_failure:
  107. reports_artifacts:
  108. path: "**/build/reports/**/*"
  109. validate_task: &VALIDATE_TASK
  110. <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  111. <<: *NODE_MODULES_CACHE_TEMPLATE
  112. timeout_in: 90m
  113. gke_container:
  114. <<: *GKE_CONTAINER_TEMPLATE
  115. cpu: 6.5
  116. memory: 16Gb
  117. additional_containers:
  118. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  119. script:
  120. - ./private/cirrus/cirrus-validate.sh postgres106
  121. on_failure:
  122. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  123. validate_license_change_task:
  124. <<: *VALIDATE_TASK
  125. name: validate # Give it the same name as its counterpart, so we can reference it on GitHub.
  126. only_if: >- # Only execute if the commit message has the "[update headers]" tag.
  127. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  128. $CIRRUS_BRANCH != "public_master" &&
  129. $CIRRUS_BRANCH != "branch-nightly-build" &&
  130. $CIRRUS_CRON == "" &&
  131. $CIRRUS_CHANGE_MESSAGE =~ '.*\[update headers\].*'
  132. timeout_in: 180m # Increase timeout, as license changes impact all files, which slows down the analysis considerably.
  133. yarn_check-ci_task:
  134. <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  135. <<: *NODE_MODULES_CACHE_TEMPLATE
  136. timeout_in: 90m
  137. gke_container:
  138. <<: *GKE_CONTAINER_TEMPLATE
  139. cpu: 4
  140. memory: 8Gb
  141. script: |
  142. ./private/cirrus/cirrus-env.sh YARN
  143. gradle yarn_check-ci
  144. on_failure:
  145. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  146. qa_task:
  147. <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  148. gke_container:
  149. <<: *GKE_CONTAINER_TEMPLATE
  150. cpu: 3
  151. memory: 7Gb
  152. additional_containers:
  153. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  154. env:
  155. # No need to clone the full history.
  156. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  157. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  158. CIRRUS_CLONE_DEPTH: 50
  159. matrix:
  160. - QA_CATEGORY: Cat1
  161. - QA_CATEGORY: Cat2
  162. - QA_CATEGORY: Cat3
  163. - QA_CATEGORY: Cat4
  164. - QA_CATEGORY: Cat5
  165. - QA_CATEGORY: Cat6
  166. - QA_CATEGORY: Cat7
  167. - QA_CATEGORY: Authentication
  168. - QA_CATEGORY: Gov
  169. - QA_CATEGORY: Dev
  170. - QA_CATEGORY: License
  171. - QA_CATEGORY: Branch
  172. - QA_CATEGORY: Upgrade
  173. script:
  174. - ./private/cirrus/cirrus-qa.sh postgres106
  175. on_failure:
  176. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  177. qa_bitbucket_task:
  178. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  179. gke_container:
  180. <<: *GKE_CONTAINER_TEMPLATE
  181. cpu: 3
  182. memory: 7Gb
  183. additional_containers:
  184. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  185. maven_cache:
  186. folder: ~/.m2
  187. env:
  188. # No need to clone the full history.
  189. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  190. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  191. CIRRUS_CLONE_DEPTH: 50
  192. QA_CATEGORY: BITBUCKET
  193. matrix:
  194. - name: qa_bitbucket_5.16.11
  195. bitbucket_background_script: ./private/cirrus/cirrus-start-bitbucket.sh 5.16.11
  196. - name: qa_bitbucket_latest
  197. bitbucket_background_script: ./private/cirrus/cirrus-start-bitbucket.sh LATEST
  198. 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
  199. script:
  200. - ./private/cirrus/cirrus-qa.sh postgres106
  201. on_failure:
  202. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  203. qa_ha_task:
  204. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  205. gke_container:
  206. <<: *GKE_CONTAINER_TEMPLATE
  207. cpu: 2.4
  208. memory: 10Gb
  209. additional_containers:
  210. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  211. env:
  212. # No need to clone the full history.
  213. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  214. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  215. CIRRUS_CLONE_DEPTH: 50
  216. QA_CATEGORY: HA
  217. gradle_cache:
  218. folder: ~/.gradle/caches
  219. script:
  220. - ./private/cirrus/cirrus-qa.sh postgres106
  221. cleanup_before_cache_script:
  222. - ./private/cirrus/cleanup-gradle-cache.sh
  223. on_failure:
  224. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  225. # 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.
  226. qa_gitlab_task:
  227. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  228. gke_container:
  229. <<: *GKE_CONTAINER_TEMPLATE
  230. cpu: 2.4
  231. memory: 5Gb
  232. use_in_memory_disk: true
  233. additional_containers:
  234. - name: gitlab
  235. image: gitlab/gitlab-ce:latest
  236. port: 8080:80
  237. cpu: 1
  238. memory: 5Gb
  239. env:
  240. # Creating a personnal access token from rails console for test purpuse (can't do through gitlab REST API)
  241. GITLAB_POST_RECONFIGURE_SCRIPT: "gitlab-rails runner \"
  242. token = User.find_by_username('root').personal_access_tokens.create(scopes: [:api], name: 'token');
  243. token.set_token('token-here-456');
  244. token.save!;
  245. token_read = User.find_by_username('root').personal_access_tokens.create(scopes: [:read_api], name: 'token_read');
  246. token_read.set_token('token-read-123');
  247. token_read.save!;
  248. user = User.find_by_username('root');
  249. user.password = 'adminadmin';
  250. user.password_confirmation = 'adminadmin';
  251. user.save!;
  252. \""
  253. env:
  254. # No need to clone the full history.
  255. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  256. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  257. CIRRUS_CLONE_DEPTH: 50
  258. QA_CATEGORY: GITLAB
  259. gradle_cache:
  260. folder: ~/.gradle/caches
  261. script:
  262. - ./private/cirrus/cirrus-qa.sh h2
  263. cleanup_before_cache_script:
  264. - ./private/cirrus/cleanup-gradle-cache.sh
  265. on_failure:
  266. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  267. # Azure QA is executed in a dedicated task in order to not slow down the pipeline.
  268. qa_azure_task:
  269. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  270. gke_container:
  271. <<: *GKE_CONTAINER_TEMPLATE
  272. cpu: 2.4
  273. memory: 5Gb
  274. env:
  275. # No need to clone the full history.
  276. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  277. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  278. CIRRUS_CLONE_DEPTH: 50
  279. QA_CATEGORY: AZURE
  280. AZURE_USERNAME_LOGIN: ENCRYPTED[dcdf19769c1501408ebc22670c76d5e375cd739de2df5dfa3f215aa795296dfb257dbbcbe9bdfd33135feb04421fea1f]
  281. AZURE_CODE_READ_AND_WRITE_TOKEN: ENCRYPTED[eddc3448b40e72310f24f21241bdc1243860139d1a5aad593b016baedf03e4bba3f9e3d8d9f6329fe3b587966a8112d2]
  282. AZURE_FULL_ACCESS_TOKEN: ENCRYPTED[58779d6588e2e10d1b6f98fcc58a46957f8ef3a18e29d79abc6aa8d69ea55c23d8708e1f1af626464d309b1c7c087985]
  283. gradle_cache:
  284. folder: ~/.gradle/caches
  285. script:
  286. - ./private/cirrus/cirrus-qa.sh h2
  287. cleanup_before_cache_script:
  288. - ./private/cirrus/cleanup-gradle-cache.sh
  289. on_failure:
  290. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  291. # SAML QA is executed in a dedicated task in order to not slow down the pipeline, as a Keycloak server docker image is required.
  292. qa_saml_task:
  293. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  294. gke_container:
  295. <<: *GKE_CONTAINER_TEMPLATE
  296. cpu: 2.4
  297. memory: 10Gb
  298. additional_containers:
  299. - name: keycloak
  300. image: jboss/keycloak:7.0.0
  301. port: 8080
  302. cpu: 1
  303. memory: 1Gb
  304. env:
  305. KEYCLOAK_USER: admin
  306. KEYCLOAK_PASSWORD: admin
  307. env:
  308. # No need to clone the full history.
  309. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  310. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  311. CIRRUS_CLONE_DEPTH: 50
  312. QA_CATEGORY: SAML
  313. gradle_cache:
  314. folder: ~/.gradle/caches
  315. script:
  316. - ./private/cirrus/cirrus-qa.sh h2
  317. cleanup_before_cache_script:
  318. - ./private/cirrus/cleanup-gradle-cache.sh
  319. on_failure:
  320. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  321. # 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.
  322. qa_ldap_task:
  323. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  324. gke_container:
  325. <<: *GKE_CONTAINER_TEMPLATE
  326. cpu: 2.4
  327. memory: 10Gb
  328. env:
  329. # No need to clone the full history.
  330. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  331. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  332. CIRRUS_CLONE_DEPTH: 50
  333. QA_CATEGORY: LDAP
  334. gradle_cache:
  335. folder: ~/.gradle/caches
  336. script:
  337. - ./private/cirrus/cirrus-qa.sh h2
  338. cleanup_before_cache_script:
  339. - ./private/cirrus/cleanup-gradle-cache.sh
  340. on_failure:
  341. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  342. promote_task: &PROMOTE_TASK
  343. <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  344. depends_on:
  345. - build
  346. - validate
  347. - qa
  348. - qa_saml
  349. - qa_ldap
  350. gke_container:
  351. <<: *GKE_CONTAINER_TEMPLATE
  352. stateful: true
  353. env:
  354. # No need to clone the full history.
  355. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  356. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  357. CIRRUS_CLONE_DEPTH: 50
  358. script:
  359. - ./private/cirrus/cirrus-promote.sh
  360. promote_license_change_task:
  361. <<: *PROMOTE_TASK
  362. name: promote # Give it the same name as its counterpart, so we can reference it on GitHub.
  363. only_if: >- # Only execute if the commit message has the "[update headers]" tag.
  364. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  365. $CIRRUS_BRANCH != "public_master" &&
  366. $CIRRUS_BRANCH != "branch-nightly-build" &&
  367. $CIRRUS_CRON == "" &&
  368. $CIRRUS_CHANGE_MESSAGE =~ '.*\[update headers\].*'
  369. depends_on:
  370. - build
  371. - validate
  372. deploy_docs_task:
  373. depends_on: promote
  374. only_if: $CIRRUS_BRANCH == 'dogfood-on-next'
  375. gke_container:
  376. <<: *GKE_CONTAINER_TEMPLATE
  377. env:
  378. # No need to clone the full history.
  379. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  380. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  381. CIRRUS_CLONE_DEPTH: 50
  382. script:
  383. - ./private/cirrus/cirrus-trigger-deploy-docs.sh
  384. sql_mssql2019_task:
  385. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  386. gke_container:
  387. <<: *GKE_CONTAINER_TEMPLATE
  388. memory: 5Gb
  389. additional_containers:
  390. - name: mssql
  391. image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
  392. port: 1433
  393. cpu: 2
  394. memory: 5Gb
  395. env:
  396. MSSQL_PID: Developer # this is the default edition
  397. ACCEPT_EULA: Y
  398. SA_PASSWORD: sonarqube!1
  399. script:
  400. - ./private/cirrus/cirrus-db-unit-test.sh mssql2017
  401. on_failure:
  402. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  403. # this is the oldest compatible version of PostgreSQL
  404. sql_postgres93_task:
  405. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  406. gke_container:
  407. <<: *GKE_CONTAINER_TEMPLATE
  408. memory: 5Gb
  409. additional_containers:
  410. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  411. image: postgres:9.3
  412. script:
  413. - ./private/cirrus/cirrus-db-unit-test.sh postgres93
  414. on_failure:
  415. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  416. sql_oracle12_task:
  417. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  418. gke_container:
  419. <<: *GKE_CONTAINER_TEMPLATE
  420. memory: 5Gb
  421. additional_containers:
  422. - <<: *ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  423. script:
  424. - ./private/cirrus/cirrus-db-unit-test.sh oracle12
  425. on_failure:
  426. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  427. upgd_mssql2019_task:
  428. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  429. gke_container:
  430. <<: *GKE_CONTAINER_TEMPLATE
  431. cpu: 1.5
  432. memory: 6Gb
  433. additional_containers:
  434. - name: mssql
  435. image: mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04
  436. port: 1433
  437. cpu: 2
  438. memory: 5Gb
  439. env:
  440. MSSQL_PID: Developer # this is the default edition
  441. ACCEPT_EULA: Y
  442. SA_PASSWORD: sonarqube!1
  443. env:
  444. # No need to clone the full history.
  445. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  446. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  447. CIRRUS_CLONE_DEPTH: 50
  448. matrix:
  449. QA_CATEGORY: Upgrade
  450. script:
  451. - ./private/cirrus/cirrus-qa.sh mssql2017
  452. on_failure:
  453. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  454. upgd_oracle12_task:
  455. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  456. gke_container:
  457. <<: *GKE_CONTAINER_TEMPLATE
  458. cpu: 1.5
  459. memory: 6Gb
  460. additional_containers:
  461. - <<: *ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  462. env:
  463. # No need to clone the full history.
  464. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  465. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  466. CIRRUS_CLONE_DEPTH: 50
  467. matrix:
  468. QA_CATEGORY: Upgrade
  469. script:
  470. - ./private/cirrus/cirrus-qa.sh oracle12
  471. on_failure:
  472. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  473. # Software Composition Analysis (SCA): check potential vulnerabilities in dependencies.
  474. # Note that license compliance of dependencies is not checked for now.
  475. owasp_check_task:
  476. only_if: >-
  477. $CIRRUS_CRON == "nightly" ||
  478. $CIRRUS_CRON == "weekly-latest" ||
  479. $CIRRUS_CRON == "weekly-lts" ||
  480. changesInclude('private/owasp/*.xml')
  481. timeout_in: 30m
  482. gke_container:
  483. <<: *GKE_CONTAINER_TEMPLATE
  484. cpu: 1.7
  485. memory: 4Gb
  486. environment:
  487. # No need to clone the full history.
  488. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  489. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  490. CIRRUS_CLONE_DEPTH: 50
  491. SLACK_WEBHOOK_SQ: ENCRYPTED[dec8e4350cbea3b94d63098558bcb3ae9e79b71c2b6286fcfb9eb80c0953b6448b10f7271b07b5e75e52f362c25d7a8f]
  492. script:
  493. - gradle dependencyCheckAggregate
  494. on_failure:
  495. slack_notification_script:
  496. - ./private/cirrus/cirrus-owasp-notification.sh
  497. always:
  498. reports_artifacts:
  499. path: "build/reports/*"