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

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