-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfabfile.py
56 lines (40 loc) · 1.19 KB
/
fabfile.py
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
from fabric.api import local
from fabric.colors import blue, red
######################################################################
# FABRIC Fabfile. <http://www.fabfile.org/>
# This is the file to configure Fabric Python Library to admin tasks
# Use:
# fab <command>
# How to know the commands? :
# fab -l
# Info about command:
# fab -d <command>
#######################################################################
# Butterfly Devs @ Granada 2017
def requirements():
"""
Run this task to run provisioning of requirements of the API.
Example of use: fab requirements
:return: None
"""
local('sudo . ./requirements.sh')
def run():
"""
Run back_end in local host.
:return:
"""
local('google_appengine/dev_appserver.py app.yaml &')
def test():
"""
Testing all app.
:return:
"""
print (blue('Runing IVCheckerBackEnd Test Suite ##'))
local('pytest test/ -vv -s')
def kill():
"""
Kill all processes that is related with google dev server.
:return:
"""
print (red("Killing all processes taht are related with google dev server."))
local("kill -9 $(ps -aux | grep google | awk '{ print $2}' | head -n -1)")