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

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