Exemple #1
0
def getBuildsWithCumulativeAgents(builds):
    linux_agents = _getCumulativeAgents(Const.getCoreRpmsDir())
    windows_agents = _getCumulativeAgents(Const.getCoreExesDir())
    for build in builds:
        if linux_agents:
            build.rpms = linux_agents.rpms
        if windows_agents:
            build.windows_update.sn_installer_path = windows_agents.windows_update.sn_installer_path
            build.windows_update.async_exec_path = windows_agents.windows_update.async_exec_path
    return builds
Exemple #2
0
def _deployBaseExesFiles(files):
    _, plesk_root = uPEM.getMNInfo()
    dst_path = os.path.join(plesk_root, Const.getCoreExesDir())
    if not os.path.exists(dst_path):
        uLogging.debug('Create directory: %s' % dst_path)
        os.makedirs(dst_path)
    for src_file_path in files:
        file_name = os.path.basename(src_file_path)
        dst_file_path = os.path.join(dst_path, file_name)
        uLogging.debug('Copying %s to %s' % (src_file_path, dst_file_path))
        shutil.copy2(src_file_path, dst_file_path)