22 lines
643 B
Python
22 lines
643 B
Python
from fabric.api import env, lcd, local, abort
|
|
|
|
def basic_environment_settings():
|
|
env.stack_name = 'api'
|
|
|
|
def staging():
|
|
basic_environment_settings()
|
|
env.environment = 'staging'
|
|
|
|
def production():
|
|
basic_environment_settings()
|
|
env.environment = 'production'
|
|
|
|
def cloudformation_update():
|
|
with lcd('./cloudformation/'):
|
|
local('make update-stack ENVIRONMENT_NAME={0} STACK_NAME={1}'.format(env.environment, env.stack_name))
|
|
|
|
def deploy():
|
|
if env.environment != 'staging':
|
|
abort('Local deploy to staging only. Production deploy is automatic when merging to master.')
|
|
local('make publish-to-staging')
|