fixed project.branch variable storage
modified: modules/conf_setup.py modified: share/templates/meta/staging.yml
This commit is contained in:
parent
23a8a0ac45
commit
ab69f72aff
2 changed files with 7 additions and 5 deletions
|
|
@ -77,8 +77,8 @@ def _backup_meta():
|
|||
# the development.yml file needs to be
|
||||
# modified before it can be copied over
|
||||
|
||||
_store_configuration(config_dev)
|
||||
_store_configuration(config_stg)
|
||||
_store_configuration(config_dev, 'development')
|
||||
_store_configuration(config_stg, 'staging')
|
||||
|
||||
|
||||
def _backup_readmes():
|
||||
|
|
@ -123,6 +123,8 @@ def _modify_configuration(branch):
|
|||
# we don't use 'paths/home' in anything other than dev
|
||||
if branch == 'development':
|
||||
config_yaml['project']['paths']['home'] = 'PROJECT_NAME.prj'
|
||||
else:
|
||||
config_yaml['project']['branch'] = "BRANCH_NAME"
|
||||
|
||||
config_yaml['project']['user'] = 'BRANCH_USER'
|
||||
config_yaml['project']['group'] = 'BRANCH_GROUP'
|
||||
|
|
@ -174,7 +176,7 @@ def _modify_configuration(branch):
|
|||
return config_yaml
|
||||
|
||||
|
||||
def _store_configuration(config_dict):
|
||||
def _store_configuration(config_dict, branch):
|
||||
"""
|
||||
takes config dictionary converts it to a yaml file object,
|
||||
then saves it under the appropriate file name
|
||||
|
|
@ -188,7 +190,7 @@ def _store_configuration(config_dict):
|
|||
import yaml
|
||||
from fabric.operations import put
|
||||
|
||||
branch_name = config_dict['project']['branch'] + ".yml"
|
||||
branch_name = branch + ".yml"
|
||||
|
||||
dest_path = os.path.join(
|
||||
configuration.tools.fabric.templates.meta,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ nginx:
|
|||
port: NGINX_PORT
|
||||
overrides: [null]
|
||||
project:
|
||||
branch: staging
|
||||
branch: BRANCH_NAME
|
||||
extension: BRANCH_EXT
|
||||
group: BRANCH_GROUP
|
||||
host: PROJECT_IP
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue