Commits (2)
......@@ -32,7 +32,7 @@ Those are global project parameters mandatory to Drupalizer.
|Project root directory.
|_interactive_mode_
|If False, no prompt. Useful for Jenkins.
|If false, no prompt. Useful for Jenkins.
|_locale_
|If True, install the site in French.
......@@ -164,9 +164,9 @@ TIP: 'dev' is the environment to deploy the Drupal installation, see the default
* _Deploy_ the Drupal installation to Aegir
$ fab --set=build_number=1,migrate=true,remove_platform_without_sites=true deploy:dev
$ fab --set=build_number=1,migrate=true,remove_platform=true deploy:dev
TIP: 'migrate' and 'remove_platform_without_sites' are optionals parameters but 'build_number' is not, you should pass it always with a different value.
TIP: 'migrate' and 'remove_platform' are optionals parameters but 'build_number' is not, you should pass it always with a different value.
== Other common tasks
......
......@@ -7,7 +7,6 @@ from fabric.api import env
env.project_name = ''
env.workspace = path.join(path.dirname(__file__), path.pardir)
env.interactive_mode = True
env.locale = False
......
......@@ -220,7 +220,7 @@ def migrate(environment):
if env.get('migrate', "false") == "true":
_aegir_migrate_sites(target, environment, platform)
if env.get('remove_platform_without_sites', "false") == "true":
if env.get('remove_platforms', "false") == "true":
_aegir_remove_platform_without_sites(target, environment, platform)
else:
# Deploy to a Web Server
......
......@@ -141,7 +141,7 @@ def container_start(role='local'):
# If container was successful build, get the IP address and show it to the user.
env.container_ip = h.fab_run(role, 'docker inspect -f "{{{{.NetworkSettings.IPAddress}}}}" '
'{}_container'.format(env.project_name), capture=True)
if env.interactive_mode:
if env.get('interactive_mode', True) != 'false':
h.fab_update_hosts(env.container_ip, env.site_hostname)
print(green('Docker container {}_container was build successful. '
......@@ -165,7 +165,7 @@ def container_stop(role='local'):
"""
with h.fab_cd(role, env.workspace):
if '{}_container'.format(env.project_name) in docker_ps():
if env.interactive_mode:
if env.get('interactive_mode', True) != 'false':
h.fab_remove_from_hosts(env.site_hostname)
h.fab_run(role, 'docker stop {}_container'.format(env.project_name))
print(green('Docker container {}_container was successful stopped'.format(env.project_name)))
......@@ -183,7 +183,7 @@ def container_remove(role='local'):
with h.fab_cd(role, env.workspace):
if '{}_container'.format(env.project_name) in docker_ps():
if env.interactive_mode:
if env.get('interactive_mode', True) != 'false':
h.fab_remove_from_hosts(env.site_hostname)
h.fab_run(role, 'docker rm -f {}_container'.format(env.project_name))
......
......@@ -44,13 +44,13 @@ def make(action='install'):
drush_opts += "--contrib-destination=profiles/{} ".format(env.site_profile)
h.update_profile()
if not env.interactive_mode:
if env.get('interactive_mode', True) == 'false':
drush_opts += "--translations=fr "
elif confirm(red('Say [Y] to {} the site at {} with the French translation, if you say [n] '
'the site will be installed in English only'.format(action, env.site_root))):
drush_opts += "--translations=fr "
if env.interactive_mode:
if env.get('interactive_mode', True) != 'false':
drush_opts += " --working-copy --no-gitinfofile"
if not h.fab_exists('local', env.site_root):
h.fab_run('local', "mkdir {}".format(env.site_root))
......