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"
|
|
|
|
|
|
|
|
.variables_app_restart_cmd: &variables_app_restart_cmd
|
|
|
|
variables:
|
|
|
|
APP_RESTART_CMD: "bundle exec rake environment zammad:ci:app:restart"
|
|
|
|
|
|
|
|
.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
|
|
|
|
name: registry.znuny.com/docker/zammad-mysql:latest
|
|
|
|
alias: mysql
|
|
|
|
|
|
|
|
.docker_postgresql: &docker_postgresql
|
|
|
|
name: registry.znuny.com/docker/zammad-postgresql:latest
|
|
|
|
alias: postgresql
|
|
|
|
|
|
|
|
# elasticsearch docker
|
|
|
|
.docker_elasticsearch: &docker_elasticsearch
|
|
|
|
name: registry.znuny.com/docker/zammad-elasticsearch:$ELASTICSEARCH_TAG
|
|
|
|
alias: elasticsearch
|
|
|
|
|
|
|
|
# selenium docker
|
|
|
|
.docker_selenium: &docker_selenium
|
2020-07-16 09:44:57 +00:00
|
|
|
name: docker.io/elgalu/selenium:latest
|
2020-05-06 09:32:26 +00:00
|
|
|
alias: selenium
|
|
|
|
|
|
|
|
# selenium docker
|
|
|
|
.docker_imap: &docker_imap
|
|
|
|
name: registry.znuny.com/docker/docker-imap-devel:latest
|
|
|
|
alias: mail
|
|
|
|
|
|
|
|
# service templates
|
|
|
|
.services_mysql: &services_mysql
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
|
|
|
|
.services_postgresql: &services_postgresql
|
|
|
|
services:
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
|
|
|
|
.services_mysql_postgresql: &services_mysql_postgresql
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
|
|
|
|
.services_postgresql_selenium: &services_postgresql_selenium
|
|
|
|
services:
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_selenium
|
|
|
|
|
|
|
|
.services_mysql_postgresql_elasticsearch: &services_mysql_postgresql_elasticsearch
|
|
|
|
variables:
|
|
|
|
ELASTICSEARCH_TAG: 'stable'
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_elasticsearch
|
|
|
|
|
|
|
|
.services_mysql_postgresql_elasticsearch_selenium_imap: &services_mysql_postgresql_elasticsearch_selenium_imap
|
|
|
|
variables:
|
|
|
|
ELASTICSEARCH_TAG: 'stable'
|
|
|
|
services:
|
|
|
|
- <<: *docker_mysql
|
|
|
|
- <<: *docker_postgresql
|
|
|
|
- <<: *docker_elasticsearch
|
|
|
|
- <<: *docker_selenium
|
|
|
|
- <<: *docker_imap
|
|
|
|
|
|
|
|
# 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
|
|
|
- ''
|