forked from gramener/gramex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
53 lines (49 loc) · 1.5 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
# 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
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
# Deploy the master / release branches on gramener.com
deploy-gramener:
only: [master, release]
script:
- 'ssh ubuntu@gramener.com "
cd /mnt/gramener/apps/gramex;
git checkout -- .;
git pull;
export PATH=/mnt/gramener/anaconda3/bin/:$PATH;
pip install -e .;
gramex setup --all;
pip install 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 release branch additionally on UAT server
deploy-uat:
only: [release]
script:
- 'ssh ubuntu@uat.gramener.com "
cd ~/gramex;
git checkout -- .;
git pull;
export PATH=/home/ubuntu/anaconda3/bin/:$PATH;
pip install -e .;
gramex setup --all;
pip install gramexenterprise;
gramex license accept;
"'