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.

155 lines
3.9 KiB

  1. ## 1. Download/install drone binary:
  2. ## curl -L https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar zx
  3. ## 2. Adjust the matrix as wished
  4. ## 3. Run: ./drone jsonnet --stream --format yml
  5. ## 4. Commit the result
  6. local Pipeline(test_set, database, services) = {
  7. kind: "pipeline",
  8. name: "int-"+database+"-"+test_set,
  9. services: services,
  10. steps: [
  11. {
  12. name: "integration-"+test_set,
  13. image: "ghcr.io/nextcloud/continuous-integration-php8.2:latest",
  14. environment: {
  15. APP_NAME: "spreed",
  16. CORE_BRANCH: "master",
  17. GUESTS_BRANCH: "master",
  18. NOTIFICATIONS_BRANCH: "master",
  19. DATABASEHOST: database
  20. },
  21. commands: [
  22. "bash tests/drone-run-integration-tests.sh || exit 0",
  23. "composer --version",
  24. "composer self-update --2",
  25. "wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh",
  26. "bash ./before_install.sh $APP_NAME $CORE_BRANCH $DATABASEHOST",
  27. "cd ../server",
  28. "cd apps/$APP_NAME",
  29. "composer install --no-dev",
  30. "cd ../..",
  31. "./occ app:enable $APP_NAME",
  32. "git clone --depth 1 -b $NOTIFICATIONS_BRANCH https://github.com/nextcloud/notifications apps/notifications",
  33. "./occ app:enable notifications"
  34. ] + (
  35. if test_set == "conversation" || test_set == "conversation-2" then [
  36. "git clone --depth 1 -b $GUESTS_BRANCH https://github.com/nextcloud/guests apps/guests"
  37. ] else []
  38. ) + [
  39. "cd apps/$APP_NAME/tests/integration/",
  40. "bash run.sh features/"+test_set
  41. ]
  42. }
  43. ],
  44. trigger: {
  45. branch: [
  46. "master",
  47. "stable*"
  48. ],
  49. event: (
  50. if database == "pgsql" then ["pull_request", "push"] else ["push"]
  51. )
  52. }
  53. };
  54. local PipelineSQLite(test_set) = Pipeline(
  55. test_set,
  56. "sqlite",
  57. [
  58. {
  59. name: "cache",
  60. image: "ghcr.io/nextcloud/continuous-integration-redis:latest"
  61. }
  62. ]
  63. );
  64. local PipelineMySQL(test_set) = Pipeline(
  65. test_set,
  66. "mysql",
  67. [
  68. {
  69. name: "cache",
  70. image: "ghcr.io/nextcloud/continuous-integration-redis:latest"
  71. },
  72. {
  73. name: "mysql",
  74. image: "ghcr.io/nextcloud/continuous-integration-mariadb-10.4:10.4",
  75. environment: {
  76. MYSQL_ROOT_PASSWORD: "owncloud",
  77. MYSQL_USER: "oc_autotest",
  78. MYSQL_PASSWORD: "owncloud",
  79. MYSQL_DATABASE: "oc_autotest"
  80. },
  81. command: [
  82. "--innodb_large_prefix=true",
  83. "--innodb_file_format=barracuda",
  84. "--innodb_file_per_table=true",
  85. "--sql-mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
  86. ],
  87. tmpfs: [
  88. "/var/lib/mysql"
  89. ]
  90. }
  91. ]
  92. );
  93. local PipelinePostgreSQL(test_set) = Pipeline(
  94. test_set,
  95. "pgsql",
  96. [
  97. {
  98. name: "cache",
  99. image: "ghcr.io/nextcloud/continuous-integration-redis:latest"
  100. },
  101. {
  102. name: "pgsql",
  103. image: "ghcr.io/nextcloud/continuous-integration-postgres-13:postgres-13",
  104. environment: {
  105. POSTGRES_USER: "oc_autotest",
  106. POSTGRES_DB: "oc_autotest",
  107. POSTGRES_HOST_AUTH_METHOD: "trust",
  108. POSTGRES_PASSWORD: "owncloud"
  109. },
  110. tmpfs: [
  111. "/var/lib/postgresql/data"
  112. ]
  113. }
  114. ]
  115. );
  116. [
  117. PipelineSQLite("callapi"),
  118. PipelineSQLite("chat"),
  119. PipelineSQLite("chat-2"),
  120. PipelineSQLite("command"),
  121. PipelineSQLite("conversation"),
  122. PipelineSQLite("conversation-2"),
  123. PipelineSQLite("federation"),
  124. PipelineSQLite("integration"),
  125. PipelineSQLite("sharing"),
  126. PipelineSQLite("sharing-2"),
  127. PipelineMySQL("callapi"),
  128. PipelineMySQL("chat"),
  129. PipelineMySQL("chat-2"),
  130. PipelineMySQL("command"),
  131. PipelineMySQL("conversation"),
  132. PipelineMySQL("conversation-2"),
  133. PipelineMySQL("federation"),
  134. PipelineMySQL("integration"),
  135. PipelineMySQL("sharing"),
  136. PipelineMySQL("sharing-2"),
  137. PipelinePostgreSQL("callapi"),
  138. PipelinePostgreSQL("chat"),
  139. PipelinePostgreSQL("chat-2"),
  140. PipelinePostgreSQL("command"),
  141. PipelinePostgreSQL("conversation"),
  142. PipelinePostgreSQL("conversation-2"),
  143. PipelinePostgreSQL("federation"),
  144. PipelinePostgreSQL("integration"),
  145. PipelinePostgreSQL("sharing"),
  146. PipelinePostgreSQL("sharing-2"),
  147. ]