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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  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. # 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.*' && $CIRRUS_BRANCH != 'dogfood-on-next'
  30. build_task:
  31. only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master"
  32. timeout_in: 90m
  33. gke_container:
  34. dockerfile: private/docker/Dockerfile-build
  35. builder_image_project: ci-cd-215716
  36. builder_image_name: docker-builder-v1
  37. cluster_name: cirrus-euw3a-cluster
  38. zone: europe-west3-a
  39. namespace: default
  40. cpu: 3
  41. memory: 10Gb
  42. gradle_cache:
  43. folder: ~/.gradle/caches
  44. env:
  45. # No need to clone the full history.
  46. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  47. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  48. CIRRUS_CLONE_DEPTH: 50
  49. script:
  50. - ./private/cirrus/cirrus-build.sh
  51. cleanup_before_cache_script:
  52. - ./private/cirrus/cleanup-gradle-cache.sh
  53. on_failure:
  54. reports_artifacts:
  55. path: "**/build/reports/**/*"
  56. deploy_docs_task:
  57. depends_on: build
  58. only_if: $CIRRUS_BRANCH == 'dogfood-on-next'
  59. gke_container:
  60. dockerfile: private/docker/Dockerfile-build
  61. builder_image_project: ci-cd-215716
  62. builder_image_name: docker-builder-v1
  63. cluster_name: cirrus-euw3a-cluster
  64. zone: europe-west3-a
  65. namespace: default
  66. cpu: 1
  67. memory: 1Gb
  68. env:
  69. # No need to clone the full history.
  70. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  71. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  72. CIRRUS_CLONE_DEPTH: 50
  73. script:
  74. - ./private/cirrus/cirrus-trigger-deploy-docs.sh
  75. validate_task:
  76. depends_on: build
  77. only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master" && $CIRRUS_TAG != "nightly-build"
  78. timeout_in: 90m
  79. gke_container:
  80. dockerfile: private/docker/Dockerfile-build
  81. builder_image_project: ci-cd-215716
  82. builder_image_name: docker-builder-v1
  83. cluster_name: cirrus-euw3a-cluster
  84. zone: europe-west3-a
  85. namespace: default
  86. cpu: 2.4
  87. memory: 10Gb
  88. additional_containers:
  89. - name: postgres
  90. image: postgres:10.6
  91. port: 5432
  92. cpu: 1
  93. memory: 1Gb
  94. env:
  95. POSTGRES_USER: postgres
  96. POSTGRES_PASSWORD: postgres
  97. gradle_cache:
  98. folder: ~/.gradle/caches
  99. script:
  100. - ./private/cirrus/cirrus-validate.sh postgres106
  101. cleanup_before_cache_script:
  102. - ./private/cirrus/cleanup-gradle-cache.sh
  103. on_failure:
  104. reports_artifacts:
  105. path: "**/build/reports/**/*"
  106. qa_task:
  107. depends_on: build
  108. only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master" && $CIRRUS_TAG != "nightly-build"
  109. gke_container:
  110. dockerfile: private/docker/Dockerfile-build
  111. builder_image_project: ci-cd-215716
  112. builder_image_name: docker-builder-v1
  113. cluster_name: cirrus-euw3a-cluster
  114. zone: europe-west3-a
  115. namespace: default
  116. cpu: 2.4
  117. memory: 10Gb
  118. additional_containers:
  119. - name: postgres
  120. image: postgres:10.6
  121. port: 5432
  122. cpu: 1
  123. memory: 1Gb
  124. env:
  125. POSTGRES_USER: postgres
  126. POSTGRES_PASSWORD: postgres
  127. env:
  128. # No need to clone the full history.
  129. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  130. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  131. CIRRUS_CLONE_DEPTH: 50
  132. matrix:
  133. QA_CATEGORY: Cat1
  134. QA_CATEGORY: Cat2
  135. QA_CATEGORY: Cat3
  136. QA_CATEGORY: Cat4
  137. QA_CATEGORY: Cat5
  138. QA_CATEGORY: Cat6
  139. QA_CATEGORY: Cat7
  140. QA_CATEGORY: Gov
  141. QA_CATEGORY: Billing
  142. QA_CATEGORY: License
  143. QA_CATEGORY: Branch
  144. QA_CATEGORY: Upgrade
  145. gradle_cache:
  146. folder: ~/.gradle/caches
  147. script:
  148. - ./private/cirrus/cirrus-qa.sh postgres106
  149. cleanup_before_cache_script:
  150. - ./private/cirrus/cleanup-gradle-cache.sh
  151. on_failure:
  152. reports_artifacts:
  153. path: "**/build/reports/**/*"
  154. promote_task:
  155. depends_on:
  156. - build
  157. - validate
  158. - qa
  159. only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master" && $CIRRUS_TAG != "nightly-build"
  160. gke_container:
  161. dockerfile: private/docker/Dockerfile-build
  162. builder_image_project: ci-cd-215716
  163. builder_image_name: docker-builder-v1
  164. cluster_name: cirrus-euw3a-cluster
  165. zone: europe-west3-a
  166. namespace: default
  167. cpu: 1
  168. memory: 1Gb
  169. env:
  170. # No need to clone the full history.
  171. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  172. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  173. CIRRUS_CLONE_DEPTH: 50
  174. script:
  175. - ./private/cirrus/cirrus-promote.sh
  176. test_sql_mysql57_task:
  177. depends_on: build
  178. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  179. # this task on your branch
  180. only_if: $CIRRUS_TAG == "nightly-build"
  181. gke_container:
  182. image: gradle:4.10.1-jdk8
  183. cluster_name: cirrus-euw3a-cluster
  184. zone: europe-west3-a
  185. namespace: default
  186. cpu: 1
  187. memory: 10Gb
  188. additional_containers:
  189. - name: mysql
  190. image: mysql:5.7 # see https://github.com/mysql/mysql-docker
  191. port: 3306
  192. cpu: 1
  193. memory: 1Gb
  194. env:
  195. MYSQL_ROOT_PASSWORD: sonarsource
  196. MYSQL_DATABASE: sonar
  197. MYSQL_USER: sonar
  198. MYSQL_PASSWORD: sonar
  199. gradle_cache:
  200. folder: ~/.gradle/caches
  201. script:
  202. - ./private/cirrus/cirrus-db-unit-test.sh mysql57
  203. cleanup_before_cache_script:
  204. - ./private/cirrus/cleanup-gradle-cache.sh
  205. on_failure:
  206. reports_artifacts:
  207. path: "**/build/reports/**/*"
  208. test_sql_mssql2017_task:
  209. depends_on: build
  210. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  211. # this task on your branch
  212. only_if: $CIRRUS_TAG == "nightly-build"
  213. gke_container:
  214. image: gradle:4.10.1-jdk8
  215. cluster_name: cirrus-euw3a-cluster
  216. zone: europe-west3-a
  217. namespace: default
  218. cpu: 1
  219. memory: 5Gb
  220. additional_containers:
  221. - name: mssql
  222. image: mcr.microsoft.com/mssql/server:2017-CU12-ubuntu
  223. port: 1433
  224. cpu: 2
  225. memory: 5Gb
  226. env:
  227. MSSQL_PID: Developer # this is the default edition
  228. ACCEPT_EULA: Y
  229. SA_PASSWORD: sonarqube!1
  230. gradle_cache:
  231. folder: ~/.gradle/caches
  232. script:
  233. - ./private/cirrus/cirrus-db-unit-test.sh mssql2017
  234. cleanup_before_cache_script:
  235. - ./private/cirrus/cleanup-gradle-cache.sh
  236. on_failure:
  237. reports_artifacts:
  238. path: "**/build/reports/**/*"
  239. test_sql_mssql2019_task:
  240. depends_on: build
  241. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  242. # this task on your branch
  243. only_if: $CIRRUS_TAG == "nightly-build"
  244. gke_container:
  245. image: gradle:4.10.1-jdk8
  246. cluster_name: cirrus-euw3a-cluster
  247. zone: europe-west3-a
  248. namespace: default
  249. cpu: 1
  250. memory: 5Gb
  251. additional_containers:
  252. - name: mssql
  253. image: mcr.microsoft.com/mssql/server:2019-CTP2.2-ubuntu
  254. port: 1433
  255. cpu: 2
  256. memory: 5Gb
  257. env:
  258. MSSQL_PID: Developer # this is the default edition
  259. ACCEPT_EULA: Y
  260. SA_PASSWORD: sonarqube!1
  261. gradle_cache:
  262. folder: ~/.gradle/caches
  263. script:
  264. - ./private/cirrus/cirrus-db-unit-test.sh mssql2019
  265. cleanup_before_cache_script:
  266. - ./private/cirrus/cleanup-gradle-cache.sh
  267. on_failure:
  268. reports_artifacts:
  269. path: "**/build/reports/**/*"
  270. # this is the oldest compatible version of PostgreSQL
  271. test_sql_postgres93_task:
  272. depends_on: build
  273. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  274. # this task on your branch
  275. only_if: $CIRRUS_TAG == "nightly-build"
  276. gke_container:
  277. image: gradle:4.10.1-jdk8
  278. cluster_name: cirrus-euw3a-cluster
  279. zone: europe-west3-a
  280. namespace: default
  281. cpu: 1
  282. memory: 5Gb
  283. additional_containers:
  284. - name: postgres
  285. image: postgres:9.3
  286. port: 5432
  287. cpu: 1
  288. memory: 1Gb
  289. env:
  290. POSTGRES_USER: postgres
  291. POSTGRES_PASSWORD: postgres
  292. gradle_cache:
  293. folder: ~/.gradle/caches
  294. script:
  295. - ./private/cirrus/cirrus-db-unit-test.sh postgres93
  296. cleanup_before_cache_script:
  297. - ./private/cirrus/cleanup-gradle-cache.sh
  298. on_failure:
  299. reports_artifacts:
  300. path: "**/build/reports/**/*"
  301. test_sql_oracle12_task:
  302. depends_on: build
  303. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  304. # this task on your branch
  305. only_if: $CIRRUS_TAG == "nightly-build"
  306. gke_container:
  307. image: gradle:4.10.1-jdk8
  308. cluster_name: cirrus-euw3a-cluster
  309. zone: europe-west3-a
  310. namespace: default
  311. cpu: 1
  312. memory: 5Gb
  313. additional_containers:
  314. - name: oracle
  315. 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
  316. port: 1521
  317. cpu: 2
  318. memory: 5Gb
  319. env:
  320. ORACLE_PWD: sonarqube
  321. gradle_cache:
  322. folder: ~/.gradle/caches
  323. script:
  324. - ./private/cirrus/cirrus-db-unit-test.sh oracle12
  325. cleanup_before_cache_script:
  326. - ./private/cirrus/cleanup-gradle-cache.sh
  327. on_failure:
  328. reports_artifacts:
  329. path: "**/build/reports/**/*"
  330. test_upgrade_mysql57_task:
  331. depends_on: build
  332. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  333. # this task on your branch
  334. only_if: $CIRRUS_TAG == "nightly-build"
  335. gke_container:
  336. dockerfile: private/docker/Dockerfile-build
  337. builder_image_project: ci-cd-215716
  338. builder_image_name: docker-builder-v1
  339. cluster_name: cirrus-euw3a-cluster
  340. zone: europe-west3-a
  341. namespace: default
  342. cpu: 1.5
  343. memory: 6Gb
  344. additional_containers:
  345. - name: mysql
  346. image: mysql:5.7 # see https://github.com/mysql/mysql-docker
  347. port: 3306
  348. cpu: 1
  349. memory: 1Gb
  350. env:
  351. MYSQL_ROOT_PASSWORD: sonarsource
  352. MYSQL_DATABASE: sonar
  353. MYSQL_USER: sonar
  354. MYSQL_PASSWORD: sonar
  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. matrix:
  361. QA_CATEGORY: Upgrade
  362. gradle_cache:
  363. folder: ~/.gradle/caches
  364. script:
  365. - ./private/cirrus/cirrus-qa.sh mysql57
  366. cleanup_before_cache_script:
  367. - ./private/cirrus/cleanup-gradle-cache.sh
  368. on_failure:
  369. reports_artifacts:
  370. path: "**/build/reports/**/*"
  371. test_upgrade_mssql2017_task:
  372. depends_on: build
  373. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  374. # this task on your branch
  375. only_if: $CIRRUS_TAG == "nightly-build"
  376. gke_container:
  377. dockerfile: private/docker/Dockerfile-build
  378. builder_image_project: ci-cd-215716
  379. builder_image_name: docker-builder-v1
  380. cluster_name: cirrus-euw3a-cluster
  381. zone: europe-west3-a
  382. namespace: default
  383. cpu: 1.5
  384. memory: 6Gb
  385. additional_containers:
  386. - name: mssql
  387. image: mcr.microsoft.com/mssql/server:2017-CU12-ubuntu
  388. port: 1433
  389. cpu: 2
  390. memory: 5Gb
  391. env:
  392. MSSQL_PID: Developer # this is the default edition
  393. ACCEPT_EULA: Y
  394. SA_PASSWORD: sonarqube!1
  395. env:
  396. # No need to clone the full history.
  397. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  398. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  399. CIRRUS_CLONE_DEPTH: 50
  400. matrix:
  401. QA_CATEGORY: Upgrade
  402. gradle_cache:
  403. folder: ~/.gradle/caches
  404. script:
  405. - ./private/cirrus/cirrus-qa.sh mssql2017
  406. cleanup_before_cache_script:
  407. - ./private/cirrus/cleanup-gradle-cache.sh
  408. on_failure:
  409. reports_artifacts:
  410. path: "**/build/reports/**/*"
  411. test_upgrade_oracle12_task:
  412. depends_on: build
  413. # Comment the following line and commit with message "DO NOT MERGE" in order to run
  414. # this task on your branch
  415. only_if: $CIRRUS_TAG == "nightly-build"
  416. gke_container:
  417. dockerfile: private/docker/Dockerfile-build
  418. builder_image_project: ci-cd-215716
  419. builder_image_name: docker-builder-v1
  420. cluster_name: cirrus-euw3a-cluster
  421. zone: europe-west3-a
  422. namespace: default
  423. cpu: 1.5
  424. memory: 6Gb
  425. additional_containers:
  426. - name: oracle
  427. 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
  428. port: 1521
  429. cpu: 2
  430. memory: 5Gb
  431. env:
  432. ORACLE_PWD: sonarqube
  433. env:
  434. # No need to clone the full history.
  435. # Depth of 1 is not enough because it would fail the build in case of consecutive pushes
  436. # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
  437. CIRRUS_CLONE_DEPTH: 50
  438. matrix:
  439. QA_CATEGORY: Upgrade
  440. gradle_cache:
  441. folder: ~/.gradle/caches
  442. script:
  443. - ./private/cirrus/cirrus-qa.sh oracle12
  444. cleanup_before_cache_script:
  445. - ./private/cirrus/cleanup-gradle-cache.sh
  446. on_failure:
  447. reports_artifacts:
  448. path: "**/build/reports/**/*"