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

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