Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

.cirrus.yml 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  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[06b8fcc9aaa4b495043aa08bc4450b89588902ad9a60cc8525f53d14810aff84558812e4b7eb01131dd64f33916ac941]
  19. BURGR_USERNAME: ENCRYPTED[cf7bfb936025fb763013bbfef0ab5723c0d9b53f135d79af36f9defa933f4b5fc72842bd83a97ce9b614503c1b77e6da]
  20. BURGR_PASSWORD: ENCRYPTED[bc554fc6a06c9f14cc9924cefad0a69e962a905b6d1609fc9357d458b45fc52ac74c960ad9c7382a0691433fa9dcd483]
  21. # ops-jenkins credentials required to trigger docs deppoyment
  22. OPS_JENKINS_URL: ENCRYPTED[00ea2b88c762e374c02a3d29a306cc1cf3ceb4b3d807bda2a601486e0d483fd67a556ef295830231390f45e7d512b54d]
  23. OPS_JENKINS_USERNAME: ENCRYPTED[c778b1483a7ca000dc760ef731c2fbe1dc05a9af38f2a85206cfbcdf649e50715ca447ac291485d513aa9120b0c9abad]
  24. OPS_JENKINS_PASSWORD: ENCRYPTED[a035a2826c3bc971288284a59bd00dda193d8a81e7809e08bf4ec59b68894c16f30095a567e65755240bb7f919c2e0bf]
  25. # DOCS_JOB_TOKEN: token required to launch the deployment of documentation job on ops-jenkins (see private/cirrus/cirrus-trigger-deploy-docs.sh)
  26. DOCS_JOB_TOKEN: ENCRYPTED[7771f76a0fc0038f9929c32d98588963c8dcda6148ba054f57358bc17faa109ac638134c89067f3bacc8933d2fa2c541]
  27. # analysis on next.sonarqube.com
  28. SONARQUBE_NEXT_TOKEN: ENCRYPTED[e3d98fa0ecceb015e9803d47f78c3040f5a710d678a631107635d69f650d4e53ecaf2e2334cc1fe0c47037ec915dcda0]
  29. auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH !=~ 'branch.*'
  30. task_only_nightly_depending_on_build_template: &TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  31. depends_on: build
  32. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  33. # this task on your branch
  34. only_if: $CIRRUS_BRANCH == "branch-nightly-build"
  35. task_only_default_depending_on_build_template: &TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  36. depends_on: build
  37. only_if: >-
  38. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  39. $CIRRUS_BRANCH != "public_master" &&
  40. $CIRRUS_BRANCH != "branch-nightly-build" &&
  41. $CIRRUS_CRON == ""
  42. docker_build_container_template: &GKE_CONTAINER_TEMPLATE
  43. dockerfile: private/docker/Dockerfile-build
  44. builder_image_project: sonarqube-team
  45. builder_image_name: docker-builder-v20200915
  46. cluster_name: cirrus-ci-cluster
  47. zone: us-central1-a
  48. namespace: default
  49. cpu: 1
  50. memory: 1Gb
  51. oracle_additional_container_template: &ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  52. name: oracle
  53. 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
  54. port: 1521
  55. cpu: 2
  56. memory: 5Gb
  57. env:
  58. ORACLE_PWD: sonarqube
  59. postgres_additional_container_template: &POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  60. name: postgres
  61. image: postgres:10.6
  62. port: 5432
  63. cpu: 1
  64. memory: 1Gb
  65. env:
  66. POSTGRES_USER: postgres
  67. POSTGRES_PASSWORD: postgres
  68. reports_junit_on_failure_template: &REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  69. reports_artifacts:
  70. path: "**/build/reports/**/*"
  71. junit_artifacts:
  72. path: "**/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. build_task:
  79. only_if: >-
  80. $CIRRUS_BRANCH !=~ "dogfood/.*" &&
  81. $CIRRUS_BRANCH != "public_master" &&
  82. $CIRRUS_CRON == ""
  83. timeout_in: 90m
  84. gke_container:
  85. <<: *GKE_CONTAINER_TEMPLATE
  86. cpu: 4
  87. memory: 7Gb
  88. gradle_cache:
  89. folder: ~/.gradle/caches
  90. env:
  91. # No need to clone the full history.
  92. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  93. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  94. CIRRUS_CLONE_DEPTH: 50
  95. script:
  96. - ./private/cirrus/cirrus-build.sh
  97. cleanup_before_cache_script:
  98. - ./private/cirrus/cleanup-gradle-cache.sh
  99. on_failure:
  100. reports_artifacts:
  101. path: "**/build/reports/**/*"
  102. deploy_docs_task:
  103. depends_on: build
  104. only_if: $CIRRUS_BRANCH == 'dogfood-on-next'
  105. gke_container:
  106. <<: *GKE_CONTAINER_TEMPLATE
  107. env:
  108. # No need to clone the full history.
  109. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  110. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  111. CIRRUS_CLONE_DEPTH: 50
  112. script:
  113. - ./private/cirrus/cirrus-trigger-deploy-docs.sh
  114. validate_task:
  115. <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  116. timeout_in: 90m
  117. gke_container:
  118. <<: *GKE_CONTAINER_TEMPLATE
  119. cpu: 2
  120. memory: 9Gb
  121. additional_containers:
  122. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  123. gradle_cache:
  124. folder: ~/.gradle/caches
  125. script:
  126. - ./private/cirrus/cirrus-validate.sh postgres106
  127. cleanup_before_cache_script:
  128. - ./private/cirrus/cleanup-gradle-cache.sh
  129. on_failure:
  130. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  131. qa_task:
  132. <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  133. gke_container:
  134. <<: *GKE_CONTAINER_TEMPLATE
  135. cpu: 3
  136. memory: 7Gb
  137. additional_containers:
  138. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  139. env:
  140. # No need to clone the full history.
  141. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  142. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  143. CIRRUS_CLONE_DEPTH: 50
  144. matrix:
  145. QA_CATEGORY: Cat1
  146. QA_CATEGORY: Cat2
  147. QA_CATEGORY: Cat3
  148. QA_CATEGORY: Cat4
  149. QA_CATEGORY: Cat5
  150. QA_CATEGORY: Cat6
  151. QA_CATEGORY: Cat7
  152. QA_CATEGORY: Gov
  153. QA_CATEGORY: Billing
  154. QA_CATEGORY: License
  155. QA_CATEGORY: Branch
  156. QA_CATEGORY: Upgrade
  157. QA_CATEGORY: HA
  158. gradle_cache:
  159. folder: ~/.gradle/caches
  160. script:
  161. - ./private/cirrus/cirrus-qa.sh postgres106
  162. cleanup_before_cache_script:
  163. - ./private/cirrus/cleanup-gradle-cache.sh
  164. on_failure:
  165. <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE
  166. promote_task:
  167. <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE
  168. depends_on:
  169. - build
  170. - validate
  171. - qa
  172. gke_container:
  173. <<: *GKE_CONTAINER_TEMPLATE
  174. stateful: true
  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. script:
  181. - ./private/cirrus/cirrus-promote.sh
  182. sql_mssql2017_task:
  183. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  184. gke_container:
  185. <<: *GKE_CONTAINER_TEMPLATE
  186. memory: 5Gb
  187. additional_containers:
  188. - name: mssql
  189. image: mcr.microsoft.com/mssql/server:2017-GA-ubuntu
  190. port: 1433
  191. cpu: 2
  192. memory: 5Gb
  193. env:
  194. MSSQL_PID: Developer # this is the default edition
  195. ACCEPT_EULA: Y
  196. SA_PASSWORD: sonarqube!1
  197. gradle_cache:
  198. folder: ~/.gradle/caches
  199. script:
  200. - ./private/cirrus/cirrus-db-unit-test.sh mssql2017
  201. cleanup_before_cache_script:
  202. - ./private/cirrus/cleanup-gradle-cache.sh
  203. on_failure:
  204. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  205. # this is the oldest compatible version of PostgreSQL
  206. sql_postgres93_task:
  207. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  208. gke_container:
  209. <<: *GKE_CONTAINER_TEMPLATE
  210. memory: 5Gb
  211. additional_containers:
  212. - <<: *POSTGRES_ADDITIONAL_CONTAINER_TEMPLATE
  213. image: postgres:9.3
  214. gradle_cache:
  215. folder: ~/.gradle/caches
  216. script:
  217. - ./private/cirrus/cirrus-db-unit-test.sh postgres93
  218. cleanup_before_cache_script:
  219. - ./private/cirrus/cleanup-gradle-cache.sh
  220. on_failure:
  221. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  222. sql_oracle12_task:
  223. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  224. gke_container:
  225. <<: *GKE_CONTAINER_TEMPLATE
  226. memory: 5Gb
  227. additional_containers:
  228. - <<: *ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  229. script:
  230. - ./private/cirrus/cirrus-db-unit-test.sh oracle12
  231. cleanup_before_cache_script:
  232. - ./private/cirrus/cleanup-gradle-cache.sh
  233. on_failure:
  234. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  235. upgd_mssql2017_task:
  236. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  237. gke_container:
  238. <<: *GKE_CONTAINER_TEMPLATE
  239. cpu: 1.5
  240. memory: 6Gb
  241. additional_containers:
  242. - name: mssql
  243. image: mcr.microsoft.com/mssql/server:2017-GA-ubuntu
  244. port: 1433
  245. cpu: 2
  246. memory: 5Gb
  247. env:
  248. MSSQL_PID: Developer # this is the default edition
  249. ACCEPT_EULA: Y
  250. SA_PASSWORD: sonarqube!1
  251. env:
  252. # No need to clone the full history.
  253. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  254. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  255. CIRRUS_CLONE_DEPTH: 50
  256. matrix:
  257. QA_CATEGORY: Upgrade
  258. gradle_cache:
  259. folder: ~/.gradle/caches
  260. script:
  261. - ./private/cirrus/cirrus-qa.sh mssql2017
  262. cleanup_before_cache_script:
  263. - ./private/cirrus/cleanup-gradle-cache.sh
  264. on_failure:
  265. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  266. upgd_oracle12_task:
  267. <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE
  268. gke_container:
  269. <<: *GKE_CONTAINER_TEMPLATE
  270. cpu: 1.5
  271. memory: 6Gb
  272. additional_containers:
  273. - <<: *ORACLE_ADDITIONAL_CONTAINER_TEMPLATE
  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. matrix:
  280. QA_CATEGORY: Upgrade
  281. gradle_cache:
  282. folder: ~/.gradle/caches
  283. script:
  284. - ./private/cirrus/cirrus-qa.sh oracle12
  285. cleanup_before_cache_script:
  286. - ./private/cirrus/cleanup-gradle-cache.sh
  287. on_failure:
  288. <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE
  289. # Software Composition Analysis (SCA): check potential vulnerabilities in dependencies.
  290. # Note that license compliance of dependencies is not checked for now.
  291. owasp_check_task:
  292. only_if: >-
  293. $CIRRUS_CRON == "nightly" ||
  294. $CIRRUS_CRON == "weekly-lts"
  295. timeout_in: 30m
  296. gke_container:
  297. <<: *GKE_CONTAINER_TEMPLATE
  298. cpu: 1.7
  299. memory: 4Gb
  300. environment:
  301. # No need to clone the full history.
  302. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  303. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  304. CIRRUS_CLONE_DEPTH: 50
  305. SLACK_WEBHOOK_SQ: ENCRYPTED[dec8e4350cbea3b94d63098558bcb3ae9e79b71c2b6286fcfb9eb80c0953b6448b10f7271b07b5e75e52f362c25d7a8f]
  306. nvd_cache:
  307. # The NVD repository of vulnerabilities is big and should be cached so
  308. # that consecutive runs download only changes, but not the whole repository.
  309. folder: ~/.gradle/dependency-check-data
  310. reupload_on_changes: true
  311. script:
  312. - gradle dependencyCheckAggregate
  313. on_failure:
  314. slack_notification_script:
  315. - ./private/cirrus/cirrus-owasp-notification.sh
  316. always:
  317. reports_artifacts:
  318. path: "build/reports/*"