Ejemplo n.º 1
0
"""

from merger.conf.mergeconfhelper import get_config, load_conf, get_branches_map
from merger.utils.loggerutils import initlogger
from merger.utils.shellutils import ShellUtils
import base64
import os


##############################################
###         Configuraiton file 
##############################################
CONF_FILE                       = "merger.conf"
CONF_FILE_RELATIVE              = os.path.dirname(os.path.abspath(__file__)) + "/../../../conf/%s" % CONF_FILE
ETC_CONF_FILEPATH               = '/etc/%s' % CONF_FILE
CONFIGREADER                    = load_conf(ETC_CONF_FILEPATH, CONF_FILE_RELATIVE)

##############################################
# Core branching merging related configuration
##############################################
BRANCHES_TO_EXCLUDE             = [ item[1] for item in sorted(CONFIGREADER.items('branches'), key=lambda branch: branch[1]) if item[0].startswith("branch-exclude")]
BRANCHES_IN_CODE_FREEZE         = get_config(CONFIGREADER, 'branches', 'codefreeze-branches', default='').split(',')
BRANCHES                        = [ item[1] for item in sorted(CONFIGREADER.items('branches'), key=lambda branch: branch[1]) if item[0].startswith("branch")]
BASE_REPOSITORY_PATH            = get_config(CONFIGREADER, 'svn-repo', 'base-repository')
TMPDIR                          = get_config(CONFIGREADER, 'general', 'drive', default="") + get_config(CONFIGREADER,'general', 'tmpdir', default='/var/tmp')
SVN_USERNAME                    = get_config(CONFIGREADER, 'svn-repo', 'username')
SVN_PASSWORD                    = base64.decodestring(get_config(CONFIGREADER, 'svn-repo', 'pass'))
REPO                            = get_config(CONFIGREADER, 'svn-repo', 'REPO')

##############################################
#             Main Arguments
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
A nice place to access all configuration from.
"""

from merger.conf.mergeconfhelper import get_config, load_conf, get_branches_map
from merger.utils.loggerutils import initlogger
from merger.utils.shellutils import ShellUtils
import base64

##############################################
###         Configuraiton file
##############################################
CONF_FILE_RELATIVE = '/../../../conf/merger.conf'
ETC_CONF_FILEPATH = '/etc/merger.conf'
CONFIGREADER = load_conf(CONF_FILE_RELATIVE, ETC_CONF_FILEPATH)

##############################################
# Core branching merging related configuration
##############################################
BRANCHES_TO_EXCLUDE = [
    item[1] for item in sorted(CONFIGREADER.items('branches'),
                               key=lambda branch: branch[1])
    if item[0].startswith("branch-exclude")
]
BRANCHES_IN_CODE_FREEZE = get_config(CONFIGREADER,
                                     'branches',
                                     'codefreeze-branches',
                                     default='').split(',')
BRANCHES = [
    item[1] for item in sorted(CONFIGREADER.items('branches'),
Ejemplo n.º 3
0
"""
A nice place to access all configuration from.
"""

from merger.conf.mergeconfhelper import get_config, load_conf, get_branches_map
from merger.utils.loggerutils import initlogger
from merger.utils.shellutils import ShellUtils
import base64


##############################################
###         Configuraiton file 
##############################################
CONF_FILE_RELATIVE              = '/../../../conf/merger.conf'
ETC_CONF_FILEPATH               = '/etc/merger.conf'
CONFIGREADER                    = load_conf(CONF_FILE_RELATIVE, ETC_CONF_FILEPATH)

##############################################
# Core branching merging related configuration
##############################################
BRANCHES_TO_EXCLUDE             = [ item[1] for item in sorted(CONFIGREADER.items('branches'), key=lambda branch: branch[1]) if item[0].startswith("branch-exclude")]
BRANCHES_IN_CODE_FREEZE         = get_config(CONFIGREADER, 'branches', 'codefreeze-branches', default='').split(',')
BRANCHES                        = [ item[1] for item in sorted(CONFIGREADER.items('branches'), key=lambda branch: branch[1]) if item[0].startswith("branch")]
BASE_REPOSITORY_PATH            = get_config(CONFIGREADER, 'svn-repo', 'base-repository')
TMPDIR                          = get_config(CONFIGREADER, 'general', 'drive', default="") + get_config(CONFIGREADER,'general', 'tmpdir', default='/var/tmp')
SVN_USERNAME                    = get_config(CONFIGREADER, 'svn-repo', 'username')
SVN_PASSWORD                    = base64.decodestring(get_config(CONFIGREADER, 'svn-repo', 'pass'))
REPO                            = get_config(CONFIGREADER, 'svn-repo', 'REPO')

##############################################
#     CSV / Audit related configuration