-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
47 lines (44 loc) · 969 Bytes
/
.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
---
stages:
- test
- deploy
- "Git Sync"
test:
stage: test
before_script:
- virtualenv env
- source env/bin/activate
script:
- python setup.py install
- python -m unittest discover testing
except:
- triggers
deploy:
stage: deploy
script:
- umask 002
- sed -e "s|%(database_uri)s|$DATABASE_URI|" production.ini.tmpl > production.ini
- cp -r * $DEPLOY_DIR
- cd $DEPLOY_DIR
- virtualenv env
- source env/bin/activate
- python setup.py install
- chmod -R ug+rw .
- alembic -c production.ini upgrade head
- touch $DEPLOY_DIR/redeploy.trigger
tags:
- jscert-testing-website-production
environment: production
only:
- production
except:
- triggers
git-sync:
stage: "Git Sync"
script:
- eval `ssh-agent`
- echo "$PUSH_KEY" | ssh-add -
- git sync-remote [email protected]:resource-reasoning/testing-website.git [email protected]:resource-reasoning/testing-website.git
- ssh-agent -k
only:
- triggers