from install_docker import install_docker
from install_runner import install_runner
from set_env import init_env
from set_proxy import set_linux_global_proxy, set_docker_service_proxy, set_docekr_container_proxy, \
    set_gitlab_runner_git_proxy

if __name__ == "__main__":
    HSCUSCODE, ip_and_port = init_env()

    # set_linux_global_proxy(ip_and_port)
    #
    # set_docker_service_proxy(ip_and_port)
    #
    # set_docekr_container_proxy(ip_and_port)
    # 执行一次，设置国内镜像先
    install_docker()

    install_runner(HSCUSCODE)

    # set_gitlab_runner_git_proxy(ip_and_port)

    # install_docker()

    import os

    # 检测数据库连接
    os.system('sudo chmod +x connect_test && ./connenct_test')
