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 19KB

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