-
Notifications
You must be signed in to change notification settings - Fork 58
/
.gitlab-ci.yml
72 lines (67 loc) · 2.21 KB
/
.gitlab-ci.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
71
72
variables:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
MYSQL_DATABASE: test_datahandler
MYSQL_USER: root
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
# Define variables for nosetests pointing to the database servers
# See http://doc.gitlab.com/ee/ci/docker/using_docker_images.html
POSTGRES_SERVER: postgres
MYSQL_SERVER: mysql
REDIS_SERVER: redis
validate:
only: [master, release]
image: gramener/builderrors
script: builderrors
# Run Gramex test cases
test:
# Run test on master / release, but also on any branch marked tst or test
only: [master, release, /t*st/]
# We use a special image pkg/docker-gramex-pytest/
image: gramener/gramex-pytest:latest
# Documentation on starting services:
# http://doc.gitlab.com/ce/ci/services/postgres.html
# http://doc.gitlab.com/ce/ci/services/mysql.html
services:
- postgres:latest
- mysql:latest
- redis:latest
# TODO: elasticsearch
# TODO: mongo
script:
- pip install -e .[test] --config-settings editable_mode=strict
- gramex license accept
# TODO: Remove in next release, since this line is moved into gramener/gramex Dockerfile
- mkdir /home/gramex/.npm-packages/lib/
- sh pytest/run.sh
# Deploy the master / release branches on gramener.com
deploy-gramener:
only: [master, release]
script:
- 'ssh [email protected] "
cd /mnt/gramener/apps/gramex;
git checkout -- .;
git pull;
export PATH=/mnt/gramener/anaconda3/bin/:$PATH;
pip install -e . --config-settings editable_mode=strict;
gramex setup --all;
pip install --upgrade gramexenterprise;
gramex license accept;
rm -rf /mnt/gramener/apps/v1/gramex-update;
cp -R /mnt/gramener/apps/gramex/gramex/apps/update /mnt/gramener/apps/v1/gramex-update;
"'
# Deploy the master / release branches on uat.gramener.com
deploy-uat:
only: [master, release]
script:
- 'ssh [email protected] "
cd ~/gramex;
git checkout -- .;
git pull;
export PATH=/home/ubuntu/anaconda3/bin/:$PATH;
pip install -e . --config-settings editable_mode=strict;
gramex setup --all;
pip install --upgrade gramexenterprise;
gramex license accept;
"'