forked from elexis/elexis-environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci-deactivated.yml
70 lines (65 loc) · 2.77 KB
/
.gitlab-ci-deactivated.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# This file is a template, and might need editing before it works on your project.
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
before_script:
- docker pull mysql:8
- docker pull medevit/eenv-config
- patch -p0 docker/compose/rocketchat.yml < .test/rocketchat_trust_localhost.patch
after_script:
- ./ee system cmd logs --no-color > ee-docker-logs.txt
- ./ee system cmd stop
- ./ee system cmd rm -f
- docker volume prune -f
- docker stop test-mysql-8
- ./ee setup clean
- rm .env
stages:
- testCore
- testFull
#
# Elexis-Environment core only: ldap, keycloak, web, elexis-server
#
core:
stage: testCore
script:
- cp .test/.env.core .env # copy test environment configuration
- source .env
- ./ee setup mysql_init_code > .test/mysql/a_init.sql # prepare mysql init code for mysql startup
- docker run --name test-mysql-8 --rm -e MYSQL_ROOT_PASSWORD=test-pw -v $PWD/.test/mysql/:/docker-entrypoint-initdb.d/:ro -p 33306:3306 -d mysql:8
- ./ee system cmd pull -q # while mysql starts up pull required images
- sleep 15 # wait for mysql - lame solution
- ./ee setup configure # prepare setup and generate self-signed-cert next
- openssl req -x509 -newkey rsa:2048 -keyout ./site/certificate.key -out ./site/certificate.crt -days 365 -nodes -subj "/CN=localhost"
- ./ee system cmd up -d --build # start the elexis-environment
- .test/wait_for_http_200_es.sh # wait for elexis-server to become ready
- ./ee system cmd ps # print the status of the elexis-environment containers
- docker wait elexis-environment_ee-config_1 # wait for the elexis-server-config to exit
- ./ee system runtest # run the core runtest
- ./ee setup sync_users_es_keycloak # sync users from ES to keycloak
artifacts:
when: on_failure
paths:
- ee-docker-logs.txt
#
# Elexis-Environment all-modules-enabled
#
full:
stage: testFull
script:
- cp .test/.env.full .env
- source .env
- ./ee setup mysql_init_code > .test/mysql/a_init.sql # prepare mysql init code for mysql startup
- docker run --name test-mysql-8 --rm -e MYSQL_ROOT_PASSWORD=test-pw -v $PWD/.test/mysql/:/docker-entrypoint-initdb.d/:ro -p 33306:3306 -d mysql:8
- ./ee system cmd pull -q # while mysql starts up
- sleep 15 # wait for mysql - lame solution
- ./ee setup configure # prepare setup and generate self-signed-cert next
- openssl req -x509 -newkey rsa:2048 -keyout ./site/certificate.key -out ./site/certificate.crt -days 365 -nodes -subj "/CN=localhost"
- ./ee system cmd up -d --build
- .test/wait_for_http_200_rocketchat.sh
- ./ee system cmd ps
- docker wait elexis-environment_ee-config_1
- ./ee system runtest
artifacts:
when: on_failure
paths:
- ee-docker-logs.txt
- "*.png"