Exemplo n.º 1
0
# Utility Functions
def get_count():
    global ItemCount
    c = ItemCount
    ItemCount += 1
    return c


if __name__ == "__main__":
    os.chdir(CONFIG.WorkDir)
    print("Installing Requirements")

    for PKG in CONFIG.Requirements:
        install_pkg(PKG)

    Stylize = ConsoleStyle(options.verbose, log_file)
    import docker

    Stylize.h1(f"[Step {get_count()}]: Check Docker Environment")
    check_docker(Stylize)
    check_docker_compose(Stylize)
    system = docker.from_env()

    try:
        system.info()
    except Exception as e:
        Stylize.error("Docker connection failed, check that docker is running")
        exit(1)

    # -------------------- Build Base Images -------------------- #
    Stylize.h1(f"[Step {get_count()}]: Build Base Images ...")
Exemplo n.º 2
0
# Utility Functions
def get_count():
    global ItemCount
    c = ItemCount
    ItemCount += 1
    return c


if __name__ == '__main__':
    os.chdir(CONFIG.RootDir)

    print('Installing Requirements')
    for PKG in CONFIG.Requirements:
        install_pkg(PKG)

    Stylize = ConsoleStyle(options.verbose, log_file)
    import git

    Stylize.default('')

    if sys.platform in ["win32", "win64"]:  # Windows 32/64-bit
        git.Git.USE_SHELL = True

    Stylize.underline('Starting Update')

    # -------------------- Modules -------------------- #
    with Stage('Modules', 'base/modules'):
        Stylize.h2("Updating Utilities")
        update_repo(f"{CONFIG.BaseRepo}/Utils.git", 'utils',
                    options.repo_branch)