2020-05-06 09:32:26 +00:00
|
|
|
# Artifacts are stored for failed jobs for 2 days
|
|
|
|
.artifacts_error: &artifacts_error
|
|
|
|
artifacts:
|
|
|
|
expire_in: 2 days
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- tmp/screenshot*
|
|
|
|
- tmp/screenshots/*
|
|
|
|
- log/*.log
|
|
|
|
|
|
|
|
.variables_es: &variables_es
|
|
|
|
variables:
|
|
|
|
ES_INDEX_RAND: "true"
|
|
|
|
ES_URL: "http://elasticsearch:9200"
|
|
|
|
|
2021-08-11 11:29:38 +00:00
|
|
|
.variables_redis_memcached: &variables_redis_memcached
|
|
|
|
variables:
|
|
|
|
REDIS_URL: "redis://redis:6379"
|
|
|
|
MEMCACHE_SERVERS: "memcached"
|
|
|
|
|
2021-08-11 09:29:56 +00:00
|
|
|
.variables_selenium_firefox: &variables_selenium_firefox
|
|
|
|
variables:
|
|
|
|
REMOTE_URL: "http://selenium-firefox:4444/wd/hub"
|
|
|
|
BROWSER: "firefox"
|
|
|
|
# Settings for Selenium 3:
|
|
|
|
NODE_MAX_INSTANCES: "5"
|
|
|
|
NODE_MAX_SESSION: "5"
|
|
|
|
|
|
|
|
.variables_selenium_chrome: &variables_selenium_chrome
|
|
|
|
variables:
|
|
|
|
REMOTE_URL: "http://selenium-chrome:4444/wd/hub"
|
|
|
|
BROWSER: chrome
|
|
|
|
# Settings for Selenium 3:
|
|
|
|
NODE_MAX_INSTANCES: "5"
|
|
|
|
NODE_MAX_SESSION: "5"
|
|
|
|
|
2020-05-06 09:32:26 +00:00
|
|
|
.variables_app_restart_cmd: &variables_app_restart_cmd
|
|
|
|
variables:
|
|
|
|
APP_RESTART_CMD: "bundle exec rake environment zammad:ci:app:restart"
|
|
|
|
|
2021-09-10 09:48:31 +00:00
|
|
|
.variables_rspec_slicing: &variables_rspec_slicing
|
|
|
|
variables:
|
|
|
|
RSPEC_EXAMPLE_MATCHES: "." # Default: all. Set this to one of the slices in a job to run only that slice.
|
|
|
|
RSPEC_EXAMPLE_SLICE_1_OF_4: "^[A-H]"
|
|
|
|
RSPEC_EXAMPLE_SLICE_2_OF_4: "^[I-P]"
|
|
|
|
RSPEC_EXAMPLE_SLICE_3_OF_4: "^[Q-S]"
|
|
|
|
RSPEC_EXAMPLE_SLICE_4_OF_4: "^[^A-S]" # Rest, including lower case and other characters like '#'
|
|
|
|
|
2020-05-06 09:32:26 +00:00
|
|
|
.rules_singletest: &rules_singletest
|
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_ID
|
|
|
|
when: never
|
|
|
|
- if: '$SINGLETESTNAME && $SINGLETESTNAME == $CI_JOB_NAME'
|
|
|
|
when: always
|
|
|
|
- if: '$SINGLETESTNAME && $SINGLETESTNAME != $CI_JOB_NAME'
|
|
|
|
when: never
|
|
|
|
- if: '$CI_JOB_NAME'
|
|
|
|
when: on_success
|
|
|
|
|
|
|
|
# Workaround to enable usage of mixed SSH and Docker GitLab CI runners
|
|
|
|
.tags_docker: &tags_docker
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
|
|
|
|
# Workaround for blocked port 25 access on cloud provider infrastructure
|
|
|
|
.tags_mail: &tags_mail
|
|
|
|
tags:
|
|
|
|
- mail
|
|
|
|
|
|
|
|
.env_base: &env_base
|
|
|
|
<<: *tags_docker
|
|
|
|
<<: *artifacts_error
|
|
|
|
<<: *rules_singletest
|
|
|
|
|
|
|
|
# DB Docker
|
|
|
|
.docker_mysql: &docker_mysql
|
2021-12-22 08:25:09 +00:00
|
|
|
name: $CI_REGISTRY/docker/zammad-mysql:stable
|
2020-05-06 09:32:26 +00:00
|
|
|
alias: mysql
|
|
|
|
|
|
|
|
.docker_postgresql: &docker_postgresql
|
2021-12-22 08:25:09 +00:00
|
|
|
name: $CI_REGISTRY/docker/zammad-postgresql:stable
|
2020-05-06 09:32:26 +00:00
|
|
|
alias: postgresql
|
|
|
|
|
|
|
|
.docker_elasticsearch: &docker_elasticsearch
|
2021-12-22 08:25:09 +00:00
|
|
|
name: $CI_REGISTRY/docker/zammad-elasticsearch:$ELASTICSEARCH_TAG
|
2020-05-06 09:32:26 +00:00
|
|
|
alias: elasticsearch
|
|
|
|
|
2021-08-11 09:29:56 +00:00
|
|
|
.docker_selenium_chrome: &docker_selenium_chrome
|
2021-12-22 08:25:09 +00:00
|
|
|
name: $CI_REGISTRY/docker/zammad-selenium-chrome:stable
|
2021-08-11 09:29:56 +00:00
|
|
|
alias: selenium-chrome
|
|
|
|
|
|
|
|
.docker_selenium_firefox: &docker_selenium_firefox
|
2021-12-22 08:25:09 +00:00
|
|
|
name: $CI_REGISTRY/docker/zammad-selenium-firefox:stable
|
2021-08-11 09:29:56 +00:00
|
|
|
alias: selenium-firefox
|
2020-05-06 09:32:26 +00:00
|
|
|
|
|
|
|
.docker_imap: &docker_imap
|
2021-12-22 08:25:09 +00:00
|
|
|
name: $CI_REGISTRY/docker/zammad-imap:stable
|
2020-05-06 09:32:26 +00:00
|
|
|
alias: mail
|
|
|
|
|
2021-06-30 08:24:58 +00:00
|
|
|
.docker_redis: &docker_redis
|
2021-12-22 08:25:09 +00:00
|
|
|
name: $CI_REGISTRY/docker/zammad-redis:stable
|
2021-06-30 08:24:58 +00:00
|
|
|
alias: redis
|
|
|
|
|
2021-07-02 11:46:37 +00:00
|
|
|
.docker_memcached: &docker_memcached
|
2021-12-22 08:25:09 +00:00
|
|
|
name: $CI_REGISTRY/docker/zammad-memcached:stable
|
2021-07-02 11:46:37 +00:00
|
|
|
alias: memcached
|
|
|
|
command: ["memcached", "-m", "256M"]
|
|
|
|
|
2020-05-06 09:32:26 +00:00
|
|
|
# service templates
|
|
|
|
.services_mysql: &services_mysql
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
|
2021-07-02 11:46:37 +00:00
|
|
|
.services_mysql_redis_memcached: &services_mysql_redis_memcached
|
2021-08-11 11:29:38 +00:00
|
|
|
extends:
|
|
|
|
- .variables_redis_memcached
|
2021-06-30 08:24:58 +00:00
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_redis
|
2021-07-02 11:46:37 +00:00
|
|
|
- <<: *docker_memcached
|
2021-06-30 08:24:58 +00:00
|
|
|
|
2020-05-06 09:32:26 +00:00
|
|
|
.services_postgresql: &services_postgresql
|
|
|
|
services:
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
|
2021-07-02 11:46:37 +00:00
|
|
|
.services_postgresql_redis_memcached: &services_postgresql_redis_memcached
|
2021-08-11 11:29:38 +00:00
|
|
|
extends:
|
|
|
|
- .variables_redis_memcached
|
2021-06-30 08:24:58 +00:00
|
|
|
services:
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_redis
|
2021-07-02 11:46:37 +00:00
|
|
|
- <<: *docker_memcached
|
2021-06-30 08:24:58 +00:00
|
|
|
|
2020-05-06 09:32:26 +00:00
|
|
|
.services_mysql_postgresql: &services_mysql_postgresql
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
|
2021-07-02 11:46:37 +00:00
|
|
|
.services_mysql_postgresql_redis_memcached: &services_mysql_postgresql_redis_memcached
|
2021-08-11 11:29:38 +00:00
|
|
|
extends:
|
|
|
|
- .variables_redis_memcached
|
2021-06-30 08:24:58 +00:00
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_redis
|
2021-07-02 11:46:37 +00:00
|
|
|
- <<: *docker_memcached
|
2021-06-30 08:24:58 +00:00
|
|
|
|
2021-08-11 09:29:56 +00:00
|
|
|
.services_postgresql_selenium_chrome: &services_postgresql_selenium_chrome
|
|
|
|
extends:
|
|
|
|
- .variables_selenium_chrome
|
|
|
|
services:
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_selenium_chrome
|
|
|
|
|
|
|
|
.services_postgresql_selenium_firefox: &services_postgresql_selenium_firefox
|
|
|
|
extends:
|
|
|
|
- .variables_selenium_firefox
|
2020-05-06 09:32:26 +00:00
|
|
|
services:
|
|
|
|
- <<: *docker_postgresql
|
2021-08-11 09:29:56 +00:00
|
|
|
- <<: *docker_selenium_firefox
|
2020-05-06 09:32:26 +00:00
|
|
|
|
2020-11-17 08:31:24 +00:00
|
|
|
.services_mysql_postgresql_imap: &services_mysql_postgresql_imap
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_imap
|
|
|
|
|
2020-05-06 09:32:26 +00:00
|
|
|
.services_mysql_postgresql_elasticsearch: &services_mysql_postgresql_elasticsearch
|
|
|
|
variables:
|
|
|
|
ELASTICSEARCH_TAG: 'stable'
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_elasticsearch
|
|
|
|
|
2021-08-11 09:29:56 +00:00
|
|
|
.services_mysql_postgresql_elasticsearch_selenium_chrome_imap: &services_mysql_postgresql_elasticsearch_selenium_chrome_imap
|
|
|
|
extends:
|
|
|
|
- .variables_selenium_chrome
|
2020-05-06 09:32:26 +00:00
|
|
|
variables:
|
|
|
|
ELASTICSEARCH_TAG: 'stable'
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_elasticsearch
|
2021-08-11 09:29:56 +00:00
|
|
|
- <<: *docker_selenium_chrome
|
2020-05-06 09:32:26 +00:00
|
|
|
- <<: *docker_imap
|
|
|
|
|
2021-08-11 09:29:56 +00:00
|
|
|
.services_mysql_postgresql_elasticsearch_selenium_firefox_imap: &services_mysql_postgresql_elasticsearch_selenium_firefox_imap
|
|
|
|
extends:
|
|
|
|
- .variables_selenium_firefox
|
|
|
|
variables:
|
|
|
|
ELASTICSEARCH_TAG: 'stable'
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_elasticsearch
|
|
|
|
- <<: *docker_selenium_firefox
|
|
|
|
- <<: *docker_imap
|
|
|
|
|
|
|
|
.services_mysql_postgresql_elasticsearch_selenium_chrome_imap_redis_memcached: &services_mysql_postgresql_elasticsearch_selenium_chrome_imap_redis_memcached
|
|
|
|
extends:
|
|
|
|
- .variables_selenium_chrome
|
2021-08-11 11:29:38 +00:00
|
|
|
- .variables_redis_memcached
|
2021-08-11 09:29:56 +00:00
|
|
|
variables:
|
|
|
|
ELASTICSEARCH_TAG: 'stable'
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_elasticsearch
|
|
|
|
- <<: *docker_selenium_chrome
|
|
|
|
- <<: *docker_imap
|
|
|
|
- <<: *docker_redis
|
|
|
|
- <<: *docker_memcached
|
|
|
|
|
|
|
|
.services_mysql_postgresql_elasticsearch_selenium_firefox_imap_redis_memcached: &services_mysql_postgresql_elasticsearch_selenium_firefox_imap_redis_memcached
|
|
|
|
extends:
|
|
|
|
- .variables_selenium_firefox
|
2021-08-11 11:29:38 +00:00
|
|
|
- .variables_redis_memcached
|
2021-06-30 08:24:58 +00:00
|
|
|
variables:
|
|
|
|
ELASTICSEARCH_TAG: 'stable'
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_elasticsearch
|
2021-08-11 09:29:56 +00:00
|
|
|
- <<: *docker_selenium_firefox
|
2021-06-30 08:24:58 +00:00
|
|
|
- <<: *docker_imap
|
|
|
|
- <<: *docker_redis
|
2021-07-02 11:46:37 +00:00
|
|
|
- <<: *docker_memcached
|
2021-06-30 08:24:58 +00:00
|
|
|
|
2021-08-11 09:29:56 +00:00
|
|
|
|
2021-07-06 19:13:02 +00:00
|
|
|
.rules_integration_manual_start: &rules_integration_manual_start
|
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_ID
|
|
|
|
when: never
|
|
|
|
- if: '$CI_COMMIT_BRANCH =~ /^private/ && $INTEGRATION_TESTS == null'
|
|
|
|
when: manual
|
|
|
|
allow_failure: true
|
|
|
|
- when: on_success
|
|
|
|
|
2020-05-06 09:32:26 +00:00
|
|
|
# we need at least one job to store and include this template
|
|
|
|
# but we skip this via 'only' -> 'variables' -> '$IGNORE'
|
|
|
|
# $IGNORE is not defined
|
|
|
|
ignore:
|
|
|
|
stage: test
|
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $IGNORE
|
|
|
|
script:
|
2020-07-16 09:44:57 +00:00
|
|
|
- ''
|