fabric/fabfile.py

79 lines
1.3 KiB
Python
Raw Normal View History

new file: api.py new file: api.pyc new file: conf/fabric.yml new file: fabfile.py new file: fabfile.pyc new file: modules/__init__.py new file: modules/__init__.pyc new file: modules/conf_setup.py new file: modules/conf_setup.pyc new file: modules/configuration_setup.py new file: modules/database.py new file: modules/database.pyc new file: modules/deploy.py new file: modules/deploy.pyc new file: modules/django.py new file: modules/django.pyc new file: modules/docker.py new file: modules/docker.pyc new file: modules/initialize.py new file: modules/initialize.pyc new file: modules/maintenance.py new file: modules/maintenance.pyc new file: modules/nginx.py new file: modules/nginx.pyc new file: modules/pip.py new file: modules/pip.pyc new file: modules/setup.pyc new file: modules/supervisor.py new file: modules/supervisor.pyc new file: modules/testing/__init__.py new file: modules/testing/__init__.pyc new file: modules/testing/configuration_setup.py new file: modules/testing/maintenance.pyc new file: modules/utils.py new file: modules/utils.pyc new file: templates/conf/database/files/db.drop_all.sql.jinja2 new file: templates/conf/database/files/db.drop_db.sql.jinja2 new file: templates/conf/database/files/db.init.sql.jinja2 new file: templates/conf/database/files/db.re_init.sql.jinja2 new file: templates/conf/django/files/gunicorn.jinja2 new file: templates/conf/django/files/gunicorn.unixsocket.jinja2 new file: templates/conf/django/files/local.jinja2 new file: templates/conf/django/files/settings.jinja2 new file: templates/conf/django/files/settings18.jinja2 new file: templates/conf/django/files/wsgi.jinja2 new file: templates/conf/django/files/wsgi.py new file: templates/conf/docker/files/database.jinja2 new file: templates/conf/gunicorn/files/gunicorn.jinja2 new file: templates/conf/gunicorn/files/gunicorn.unixsocket.jinja2 new file: templates/conf/gunicorn/files/local.jinja2 new file: templates/conf/gunicorn/files/settings.jinja2 new file: templates/conf/gunicorn/files/settings18.jinja2 new file: templates/conf/gunicorn/files/wsgi.jinja2 new file: templates/conf/gunicorn/files/wsgi.py new file: templates/conf/nginx/files/default.conf.jinja2 new file: templates/conf/nginx/files/unixsocket.jinja2 new file: templates/conf/supervisor/files/conf_old new file: templates/conf/supervisor/files/supervisor.jinja2 new file: templates/meta/development.yml new file: templates/meta/layout.yml new file: templates/meta/staging.yml new file: templates/readmes/aws.md new file: templates/readmes/gandi.md new file: templates/readmes/reset_migrations.md new file: templates/readmes/setup_gandi.md new file: templates/readmes/translations.md new file: templates/readmes/update_images.md
2016-09-06 14:43:49 +03:00
from fabric.api import env, task
import modules.initialize as initialize
from modules.utils import booleanize
from api import *
#
# Note: this is a hack so I can add the various module files
# into fab --list, but without getting the syntastic errors
# because to do it I need to import them whether or not I'm using
# them. And if I am not using them, I'll get a syntastic error
branch = "development"
def setup():
print "setup fabric configuration files"
def all():
#
# set debugging conditiong
# fab {branch} {fab_command} --set debug=True
if 'debug' in env:
env.debug = booleanize(env.debug)
else:
env.debug = False
#
#
# add the config attribute to env
initialize.environment(branch)
@task
def stage():
""" Staging environment """
#
# set the branch configuration we will
# be working on
global branch
branch = "staging"
print "in staging"
all()
@task
def prod():
""" Production environment """
#
# set the branch configuration we will
# be working on
global branch
branch = "production"
print "in production"
all()
@task
def devel():
""" development environment """
global branch
branch = "development"
all()
devel()