-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.siteconfig.py
65 lines (52 loc) · 1.69 KB
/
example.siteconfig.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
57
58
59
60
61
62
63
64
from fabric.api import env, task
from fabric.utils import abort
"""Possible overrides
env.user = 'drupaldeploy'
env.shell = '/bin/bash -c'
env.web_root = '/var/www'
env.release_archive = None
env.release_time = time.strftime('%Y.%m.%d-%H.%M')
env.local_tmp = '/tmp'
env.remote_tmp = '/tmp'
To see all available tasks, run:
fab -f /path/to/deploy.py -l
To see the default deployment tasks, run:
fab -f /path/to/deploy.py list_deploy_tasks
See http://docs.python.org/tutorial/datastructures.html for list methods (eg, remove, insert, etc).
# Reverting Features #:
You can revert individual features by creating a list (env.revertable_features), and then adding drush_feature_revert to your list of tasks. eg.
env.revertable_features = [
'feature_one',
'feature_two',
]
env.deploy_tasks.insert(position, 'drush_cron')
"""
# <Sitename> Overrides:
env.site = 'example'
env.repository = 'git+ssh://git.hosting.com/drupal/example.git'
env.apptype = 'drupal'
env.remote_tmp = '/tmp'
env.local_tmp = '/tmp'
env.version = 7
if (env.stage == 'dev'):
# Append a task
env.deploy_tasks.append('drush_feature_revert_all')
# Remove a task
env.deploy_tasks.remove('drush_cache_clear_all')
# Insert a task
# Unfortunately you need to know the position in the list, so...
# eg. Insert drush_cron before drush_site_online:
position = env.deploy_tasks.index('drush_site_online')
env.deploy_tasks.insert(position, 'drush_cron')
"""
Server uri's should be specified as fqdn
"""
env.roledefs = {
'web': ['web1.server.net', 'web2.server.net'],
'db': ['db.server.net'],
'files': ['files.server.net'],
}
elif (env.stage == 'staging'):
pass
else:
abort('stage not setup in site recipe')