"""
sys.exit(1)
-import monkeypatch_sshproxy # my mind is blown. this totally works.
+# My mind is blown. This totally works.
+# see: https://github.com/fabric/fabric/issues/38#issuecomment-5608014
+import monkeypatch_sshproxy
from util import *
env.project_name = 'kraken-ui'
env.colors = True
env.use_ssh_config = True
-env.gateway = 'bastion.wmflabs.org'
### Project Config
### Setup Staging Environments
-# We declare stubs here to use @task and have them show up at the top level
+# Envs aren't declared with @task in the stages module so that we can
+# decorate them here and have them show up at the top level.
import stages
@task
def sync_files():
""" Copies `dist` package to deployment host.
"""
- local("rsync -Caz -v %(work_dir)s %(user)s@%(host)s:%(target_dir)s/%(dist)s" % env)
+ local("rsync -Crz -v %(work_dir)s %(user)s@%(host)s:%(target_dir)s/" % env)
# TODO: make sure the following works.
- # rsync_project(local_dir=env.work_dir, remote_dir="%(user)s@%(host)s:%(target_dir)s/%(dist)s" % env)
+ # rsync_project(local_dir=env.work_dir, remote_dir="%(user)s@%(host)s:%(target_dir)s/" % env)
@task
@ensure_stage
"Setup Staging Environments"
from functools import wraps
-from fabric.api import env
+from fabric.api import env, abort
+from fabric.colors import white, blue, cyan, green, yellow, red, magenta
__all__ = ('prod', 'stage', 'ensure_stage',)
"""
env.deploy_env = 'prod'
env.hosts = ['reportcard2.pmtpa.wmflabs']
+ env.gateway = 'bastion.wmflabs.org'
env.target_dir = '/srv/reportcard/kraken-ui'
env.owner = 'www-data'
env.group = 'www'