-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path__init__.py
More file actions
88 lines (62 loc) · 1.84 KB
/
__init__.py
File metadata and controls
88 lines (62 loc) · 1.84 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import docker
from deploy import *
import drush
import behat
import patternlab
from .environments import e
from fabric.api import task, env, execute
from fabric.colors import red
from fabric.contrib.console import confirm
@task
def init():
"""
Complete local installation process, used generally when building the docker image for install and configure Drupal.
"""
execute(docker.image_create)
execute(docker.container_start)
execute(drush.make, 'install')
execute(drush.site_install, host='root@{}'.format(env.container_ip))
execute(drush.aliases)
execute(behat.init, host='root@{}'.format(env.container_ip))
@task
def test(tags=''):
"""
Setup Behat and run the complete tests suite. Default output formatters: pretty and JUnit.
The JUnit report file is specified in the Behat configuration file. Default: tests/behat/out/behat.junit.xml.
:param tags Specific Behat tests tags to run.
"""
execute(behat.init)
if not tags:
execute(behat.run)
else:
execute(behat.run, tags='{}'.format(tags))
@task
def install():
"""
Run the full installation process.
"""
execute(drush.make, 'install')
execute(drush.site_install)
execute(behat.init)
@task
def update():
"""
Update the full codebase and run the availabe database updates.
"""
execute(drush.make, 'update')
execute(drush.updatedb)
execute(behat.init)
@task
def release():
"""
Generate all artefacts related to a release process or a deployment process.
"""
execute(drush.archive_dump)
execute(drush.gen_doc)
@task
def deploy(environment):
"""Deploy code and run database updates on a target Drupal environment.
"""
execute(provision, environment)
execute(push, environment, hosts=env.hosts)
execute(migrate, environment, hosts=env.hosts)