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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. # content of service-account-credentials.json, used to access to Google Cloud Platform
  2. gcp_credentials: ENCRYPTED[534d4b89444f3e4e3ba299769a98010609e71992355c132fd6e448f1d8fcb039184224c8b4cdf7933b0aec16d6a8896d]
  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[bd3d5f7fe5901d9d9f2564caebb52af285262177294eae67ba5f1a3a1df1316449ce6e09c5e1b68eeff37e024e2d167a]
  15. # notifications to burgr
  16. BURGR_URL: ENCRYPTED[06b8fcc9aaa4b495043aa08bc4450b89588902ad9a60cc8525f53d14810aff84558812e4b7eb01131dd64f33916ac941]
  17. BURGR_USERNAME: ENCRYPTED[cf7bfb936025fb763013bbfef0ab5723c0d9b53f135d79af36f9defa933f4b5fc72842bd83a97ce9b614503c1b77e6da]
  18. BURGR_PASSWORD: ENCRYPTED[bc554fc6a06c9f14cc9924cefad0a69e962a905b6d1609fc9357d458b45fc52ac74c960ad9c7382a0691433fa9dcd483]
  19. # ops-jenkins credentials required to trigger docs deppoyment
  20. OPS_JENKINS_URL: ENCRYPTED[00ea2b88c762e374c02a3d29a306cc1cf3ceb4b3d807bda2a601486e0d483fd67a556ef295830231390f45e7d512b54d]
  21. OPS_JENKINS_USERNAME: ENCRYPTED[c778b1483a7ca000dc760ef731c2fbe1dc05a9af38f2a85206cfbcdf649e50715ca447ac291485d513aa9120b0c9abad]
  22. OPS_JENKINS_PASSWORD: ENCRYPTED[a035a2826c3bc971288284a59bd00dda193d8a81e7809e08bf4ec59b68894c16f30095a567e65755240bb7f919c2e0bf]
  23. # DOCS_JOB_TOKEN: token required to launch the deployment of documentation job on ops-jenkins (see private/cirrus/cirrus-trigger-deploy-docs.sh)
  24. DOCS_JOB_TOKEN: ENCRYPTED[7771f76a0fc0038f9929c32d98588963c8dcda6148ba054f57358bc17faa109ac638134c89067f3bacc8933d2fa2c541]
  25. # analysis on next.sonarqube.com
  26. SONARQUBE_NEXT_TOKEN: ENCRYPTED[e3d98fa0ecceb015e9803d47f78c3040f5a710d678a631107635d69f650d4e53ecaf2e2334cc1fe0c47037ec915dcda0]
  27. auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH !=~ 'branch.*' && $CIRRUS_BRANCH != 'dogfood-on-next'
  28. build_task:
  29. only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master"
  30. timeout_in: 90m
  31. gke_container:
  32. dockerfile: private/docker/Dockerfile-build
  33. builder_image_project: ci-cd-215716
  34. builder_image_name: docker-builder-v1
  35. cluster_name: cirrus-euw3a-cluster
  36. zone: europe-west3-a
  37. namespace: default
  38. cpu: 3
  39. memory: 10Gb
  40. gradle_cache:
  41. folder: ~/.gradle/caches
  42. env:
  43. # No need to clone the full history.
  44. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  45. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  46. CIRRUS_CLONE_DEPTH: 50
  47. script:
  48. - ./private/cirrus/cirrus-build.sh
  49. cleanup_before_cache_script:
  50. - ./private/cirrus/cleanup-gradle-cache.sh
  51. deploy_docs_task:
  52. depends_on: build
  53. only_if: $CIRRUS_BRANCH == 'dogfood-on-next'
  54. gke_container:
  55. dockerfile: private/docker/Dockerfile-build
  56. builder_image_project: ci-cd-215716
  57. builder_image_name: docker-builder-v1
  58. cluster_name: cirrus-euw3a-cluster
  59. zone: europe-west3-a
  60. namespace: default
  61. cpu: 1
  62. memory: 1Gb
  63. env:
  64. # No need to clone the full history.
  65. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  66. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  67. CIRRUS_CLONE_DEPTH: 50
  68. script:
  69. - ./private/cirrus/cirrus-trigger-deploy-docs.sh
  70. validate_task:
  71. depends_on: build
  72. only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master"
  73. timeout_in: 90m
  74. gke_container:
  75. dockerfile: private/docker/Dockerfile-build
  76. builder_image_project: ci-cd-215716
  77. builder_image_name: docker-builder-v1
  78. cluster_name: cirrus-euw3a-cluster
  79. zone: europe-west3-a
  80. namespace: default
  81. cpu: 2.4
  82. memory: 10Gb
  83. additional_containers:
  84. - name: postgres
  85. image: postgres:10.6
  86. port: 5432
  87. cpu: 1
  88. memory: 1Gb
  89. env:
  90. POSTGRES_USER: postgres
  91. POSTGRES_PASSWORD: postgres
  92. gradle_cache:
  93. folder: ~/.gradle/caches
  94. script:
  95. - ./private/cirrus/cirrus-validate.sh postgres106
  96. cleanup_before_cache_script:
  97. - ./private/cirrus/cleanup-gradle-cache.sh
  98. qa_task:
  99. depends_on: build
  100. only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master"
  101. gke_container:
  102. dockerfile: private/docker/Dockerfile-build
  103. builder_image_project: ci-cd-215716
  104. builder_image_name: docker-builder-v1
  105. cluster_name: cirrus-euw3a-cluster
  106. zone: europe-west3-a
  107. namespace: default
  108. cpu: 2.4
  109. memory: 10Gb
  110. additional_containers:
  111. - name: postgres
  112. image: postgres:10.6
  113. port: 5432
  114. cpu: 1
  115. memory: 1Gb
  116. env:
  117. POSTGRES_USER: postgres
  118. POSTGRES_PASSWORD: postgres
  119. env:
  120. matrix:
  121. QA_CATEGORY: Cat1
  122. QA_CATEGORY: Cat2
  123. QA_CATEGORY: Cat3
  124. QA_CATEGORY: Cat4
  125. QA_CATEGORY: Cat5
  126. QA_CATEGORY: Cat6
  127. QA_CATEGORY: Cat7
  128. QA_CATEGORY: Gov
  129. QA_CATEGORY: Billing
  130. QA_CATEGORY: License
  131. QA_CATEGORY: Branch
  132. # No need to clone the full history.
  133. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  134. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  135. CIRRUS_CLONE_DEPTH: 50
  136. gradle_cache:
  137. folder: ~/.gradle/caches
  138. script:
  139. - ./private/cirrus/cirrus-qa.sh postgres106
  140. cleanup_before_cache_script:
  141. - ./private/cirrus/cleanup-gradle-cache.sh
  142. promote_task:
  143. depends_on:
  144. - build
  145. - validate
  146. - qa
  147. only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master"
  148. gke_container:
  149. dockerfile: private/docker/Dockerfile-build
  150. builder_image_project: ci-cd-215716
  151. builder_image_name: docker-builder-v1
  152. cluster_name: cirrus-euw3a-cluster
  153. zone: europe-west3-a
  154. namespace: default
  155. cpu: 1
  156. memory: 1Gb
  157. env:
  158. # No need to clone the full history.
  159. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  160. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  161. CIRRUS_CLONE_DEPTH: 50
  162. script:
  163. - ./private/cirrus/cirrus-promote.sh
  164. db_unit_mysql57_task:
  165. depends_on: build
  166. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  167. # this task on your branch
  168. only_if: $CIRRUS_BRANCH == "master"
  169. gke_container:
  170. image: gradle:4.10.1-jdk8
  171. cluster_name: cirrus-euw3a-cluster
  172. zone: europe-west3-a
  173. namespace: default
  174. cpu: 1
  175. memory: 10Gb
  176. additional_containers:
  177. - name: mysql
  178. image: mysql:5.7 # see https://github.com/mysql/mysql-docker
  179. port: 3306
  180. cpu: 1
  181. memory: 1Gb
  182. env:
  183. MYSQL_ROOT_PASSWORD: sonarsource
  184. MYSQL_DATABASE: sonar
  185. MYSQL_USER: sonar
  186. MYSQL_PASSWORD: sonar
  187. gradle_cache:
  188. folder: ~/.gradle/caches
  189. script:
  190. - ./private/cirrus/cirrus-db-unit-test.sh mysql57
  191. cleanup_before_cache_script:
  192. - ./private/cirrus/cleanup-gradle-cache.sh
  193. db_mssql2017_task:
  194. depends_on: build
  195. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  196. # this task on your branch
  197. only_if: $CIRRUS_BRANCH == "master"
  198. gke_container:
  199. image: gradle:4.10.1-jdk8
  200. cluster_name: cirrus-euw3a-cluster
  201. zone: europe-west3-a
  202. namespace: default
  203. cpu: 1
  204. memory: 5Gb
  205. additional_containers:
  206. - name: mssql
  207. image: mcr.microsoft.com/mssql/server:2017-CU12-ubuntu
  208. port: 1433
  209. cpu: 2
  210. memory: 5Gb
  211. env:
  212. MSSQL_PID: Developer # this is the default edition
  213. ACCEPT_EULA: Y
  214. SA_PASSWORD: sonarqube!1
  215. gradle_cache:
  216. folder: ~/.gradle/caches
  217. script:
  218. - ./private/cirrus/cirrus-db-unit-test.sh mssql2017
  219. cleanup_before_cache_script:
  220. - ./private/cirrus/cleanup-gradle-cache.sh
  221. db_mssql2019_task:
  222. depends_on: build
  223. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  224. # this task on your branch
  225. only_if: $CIRRUS_BRANCH == "master"
  226. gke_container:
  227. image: gradle:4.10.1-jdk8
  228. cluster_name: cirrus-euw3a-cluster
  229. zone: europe-west3-a
  230. namespace: default
  231. cpu: 1
  232. memory: 5Gb
  233. additional_containers:
  234. - name: mssql
  235. image: mcr.microsoft.com/mssql/server:2019-CTP2.2-ubuntu
  236. port: 1433
  237. cpu: 2
  238. memory: 5Gb
  239. env:
  240. MSSQL_PID: Developer # this is the default edition
  241. ACCEPT_EULA: Y
  242. SA_PASSWORD: sonarqube!1
  243. gradle_cache:
  244. folder: ~/.gradle/caches
  245. script:
  246. - ./private/cirrus/cirrus-db-unit-test.sh mssql2019
  247. cleanup_before_cache_script:
  248. - ./private/cirrus/cleanup-gradle-cache.sh
  249. # this is the oldest compatible version of PostgreSQL
  250. db_postgres93_task:
  251. depends_on: build
  252. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  253. # this task on your branch
  254. only_if: $CIRRUS_BRANCH == "master"
  255. gke_container:
  256. image: gradle:4.10.1-jdk8
  257. cluster_name: cirrus-euw3a-cluster
  258. zone: europe-west3-a
  259. namespace: default
  260. cpu: 1
  261. memory: 5Gb
  262. additional_containers:
  263. - name: postgres
  264. image: postgres:9.3
  265. port: 5432
  266. cpu: 1
  267. memory: 1Gb
  268. env:
  269. POSTGRES_USER: postgres
  270. POSTGRES_PASSWORD: postgres
  271. gradle_cache:
  272. folder: ~/.gradle/caches
  273. script:
  274. - ./private/cirrus/cirrus-db-unit-test.sh postgres93
  275. cleanup_before_cache_script:
  276. - ./private/cirrus/cleanup-gradle-cache.sh
  277. db_oracle12_task:
  278. depends_on: build
  279. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  280. # this task on your branch
  281. only_if: $CIRRUS_BRANCH == "master"
  282. gke_container:
  283. image: gradle:4.10.1-jdk8
  284. cluster_name: cirrus-euw3a-cluster
  285. zone: europe-west3-a
  286. namespace: default
  287. cpu: 1
  288. memory: 5Gb
  289. additional_containers:
  290. - name: oracle
  291. image: gcr.io/ci-cd-215716/oracle12:0.0.1 # see https://github.com/SonarSource/vms/blob/master/docker/README.md#oracle-12c to build it
  292. port: 1521
  293. cpu: 2
  294. memory: 5Gb
  295. env:
  296. ORACLE_PWD: sonarqube
  297. gradle_cache:
  298. folder: ~/.gradle/caches
  299. script:
  300. - ./private/cirrus/cirrus-db-unit-test.sh oracle12
  301. cleanup_before_cache_script:
  302. - ./private/cirrus/cleanup-gradle-cache.sh