Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
57053925
Commit
57053925
authored
Aug 05, 2016
by
Philippe Mouchel
Browse files
Use a env var provided by Fabri instead of inter..
active_mode, cause we can not override its value as it's defined in a file
parent
fb7d9b76
Changes
4
Show whitespace changes
Inline
Side-by-side
README.adoc
View file @
57053925
...
...
@@ -31,8 +31,9 @@ Those are global project parameters mandatory to Drupalizer.
|_workspace_
|Project root directory.
|_interactive_mode_
|If False, no prompt. Useful for Jenkins.
|_always_use_pty_
|This env var is defined by Fabric itself, and it's defaut value is True.
|You can easily pass it to False, addinf --no-pty to your fab command line. Useful in Jenkins jobs.
|_locale_
|If True, install the site in French.
...
...
docker.py
View file @
57053925
...
...
@@ -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
.
get
(
'
interactive_mode
'
,
True
):
if
env
.
get
(
'
always_use_pty
'
,
True
):
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
.
get
(
'
interactive_mode
'
,
True
):
if
env
.
get
(
'
always_use_pty
'
,
True
):
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
.
get
(
'
interactive_mode
'
,
True
):
if
env
.
get
(
'
always_use_pty
'
,
True
):
h
.
fab_remove_from_hosts
(
env
.
site_hostname
)
h
.
fab_run
(
role
,
'docker rm -f {}_container'
.
format
(
env
.
project_name
))
...
...
drush.py
View file @
57053925
...
...
@@ -37,7 +37,7 @@ def make(action='install'):
Build the platform by running the Makefile specified in the local_vars.py configuration file.
"""
if
env
.
get
(
'
interactive_mode
'
,
True
):
if
env
.
get
(
'
always_use_pty
'
,
True
):
if
(
isGitDirty
()):
if
(
not
confirm
(
red
(
'There are warnings on status of your repositories. '
'Do you want to continue and reset all changes to remote repositories'' states?'
),
default
=
False
)):
...
...
@@ -50,13 +50,13 @@ def make(action='install'):
drush_opts
+=
"--contrib-destination=profiles/{} "
.
format
(
env
.
site_profile
)
h
.
update_profile
()
if
not
env
.
get
(
'
interactive_mode
'
,
True
):
if
not
env
.
get
(
'
always_use_pty
'
,
True
):
drush_opts
+=
"--translations="
+
env
.
site_languages
+
" "
elif
confirm
(
red
(
'Say [Y] to {} the site at {} with the specified translation(s): {}. If you say [n] '
'the site will be installed in English only'
.
format
(
action
,
env
.
site_root
,
env
.
site_languages
))):
drush_opts
+=
"--translations="
+
env
.
site_languages
+
" "
if
env
.
get
(
'
interactive_mode
'
,
True
):
if
env
.
get
(
'
always_use_pty
'
,
True
):
drush_opts
+=
" --working-copy --no-gitinfofile"
if
not
h
.
fab_exists
(
'local'
,
env
.
site_root
):
h
.
fab_run
(
'local'
,
"mkdir {}"
.
format
(
env
.
site_root
))
...
...
git.py
View file @
57053925
...
...
@@ -49,7 +49,7 @@ def _checkRepo(repoLocalPath):
filesStatusRawInfo
=
_getFilesStatusInformation
()
print
green
(
'Verify local files status against current HEAD commit...'
)
nbWarnings
+=
_checkFilesStatusVsHeadCommit
(
filesStatusRawInfo
,
remoteName
)
nbWarnings
+=
_checkFilesStatusVsHeadCommit
(
filesStatusRawInfo
)
localBranchesRawInfo
=
_getLocalBranchesInformation
()
print
green
(
'Verify local branches exist on remote "'
+
remoteName
+
'"...'
);
...
...
@@ -61,7 +61,7 @@ def _checkRepo(repoLocalPath):
return
nbWarnings
def
_checkFilesStatusVsHeadCommit
(
filesStatusRawInfo
,
remoteName
):
def
_checkFilesStatusVsHeadCommit
(
filesStatusRawInfo
):
nbWarnings
=
0
addableFiles
=
[]
if
(
len
(
filesStatusRawInfo
)
>
0
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment