base.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Artifacts are stored for failed jobs for 2 days
  2. .artifacts_error: &artifacts_error
  3. artifacts:
  4. expire_in: 2 days
  5. when: on_failure
  6. paths:
  7. - tmp/screenshot*
  8. - tmp/screenshots/*
  9. - log/*.log
  10. .variables_es: &variables_es
  11. variables:
  12. ES_INDEX_RAND: "true"
  13. ES_URL: "http://elasticsearch:9200"
  14. .variables_app_restart_cmd: &variables_app_restart_cmd
  15. variables:
  16. APP_RESTART_CMD: "bundle exec rake environment zammad:ci:app:restart"
  17. .rules_singletest: &rules_singletest
  18. rules:
  19. - if: $CI_MERGE_REQUEST_ID
  20. when: never
  21. - if: '$SINGLETESTNAME && $SINGLETESTNAME == $CI_JOB_NAME'
  22. when: always
  23. - if: '$SINGLETESTNAME && $SINGLETESTNAME != $CI_JOB_NAME'
  24. when: never
  25. - if: '$CI_JOB_NAME'
  26. when: on_success
  27. # Workaround to enable usage of mixed SSH and Docker GitLab CI runners
  28. .tags_docker: &tags_docker
  29. tags:
  30. - docker
  31. # Workaround for blocked port 25 access on cloud provider infrastructure
  32. .tags_mail: &tags_mail
  33. tags:
  34. - mail
  35. .env_base: &env_base
  36. <<: *tags_docker
  37. <<: *artifacts_error
  38. <<: *rules_singletest
  39. # DB Docker
  40. .docker_mysql: &docker_mysql
  41. name: registry.znuny.com/docker/zammad-mysql:stable
  42. alias: mysql
  43. .docker_postgresql: &docker_postgresql
  44. name: registry.znuny.com/docker/zammad-postgresql:stable
  45. alias: postgresql
  46. .docker_elasticsearch: &docker_elasticsearch
  47. name: registry.znuny.com/docker/zammad-elasticsearch:$ELASTICSEARCH_TAG
  48. alias: elasticsearch
  49. .docker_selenium: &docker_selenium
  50. name: registry.znuny.com/docker/zammad-selenium:stable
  51. alias: selenium
  52. .docker_imap: &docker_imap
  53. name: registry.znuny.com/docker/zammad-imap:stable
  54. alias: mail
  55. # service templates
  56. .services_mysql: &services_mysql
  57. services:
  58. - <<: *docker_mysql
  59. .services_postgresql: &services_postgresql
  60. services:
  61. - <<: *docker_postgresql
  62. .services_mysql_postgresql: &services_mysql_postgresql
  63. services:
  64. - <<: *docker_mysql
  65. - <<: *docker_postgresql
  66. .services_postgresql_selenium: &services_postgresql_selenium
  67. services:
  68. - <<: *docker_postgresql
  69. - <<: *docker_selenium
  70. .services_mysql_postgresql_imap: &services_mysql_postgresql_imap
  71. services:
  72. - <<: *docker_mysql
  73. - <<: *docker_postgresql
  74. - <<: *docker_imap
  75. .services_mysql_postgresql_elasticsearch: &services_mysql_postgresql_elasticsearch
  76. variables:
  77. ELASTICSEARCH_TAG: 'stable'
  78. services:
  79. - <<: *docker_mysql
  80. - <<: *docker_postgresql
  81. - <<: *docker_elasticsearch
  82. .services_mysql_postgresql_elasticsearch_selenium_imap: &services_mysql_postgresql_elasticsearch_selenium_imap
  83. variables:
  84. ELASTICSEARCH_TAG: 'stable'
  85. services:
  86. - <<: *docker_mysql
  87. - <<: *docker_postgresql
  88. - <<: *docker_elasticsearch
  89. - <<: *docker_selenium
  90. - <<: *docker_imap
  91. # we need at least one job to store and include this template
  92. # but we skip this via 'only' -> 'variables' -> '$IGNORE'
  93. # $IGNORE is not defined
  94. ignore:
  95. stage: test
  96. only:
  97. variables:
  98. - $IGNORE
  99. script:
  100. - ''