From cdfa50723fd6ddc4f988266e20299a46af702b65 Mon Sep 17 00:00:00 2001 From: cc <18856836718@163.com> Date: Fri, 15 Mar 2024 14:35:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=85=8D=E7=BD=AE=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E9=95=9C=E5=83=8F=E7=9A=84=E4=B8=80=E4=BA=9B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 4 ++-- tools/download_dependency/build_download.sh | 4 ++-- tools/install_dependency/build_install.sh | 6 +++--- tools/install_dependency/src/command_line.py | 2 +- tools/install_dependency/src/handler/gather_package.py | 2 +- tools/install_dependency/src/handler/install_package.py | 6 ++++-- tools/install_dependency/src/machine/builder_machine.py | 2 +- tools/install_dependency/src/machine/scanner_machine.py | 2 +- 8 files changed, 15 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index edd02ab..3ea072b 100644 --- a/build.sh +++ b/build.sh @@ -16,8 +16,8 @@ sh "${current_dir}"/tools/install_dependency/build_install.sh cd "${current_dir}"/build mkdir -p "${current_dir}"/build/dekvit-pipeline-${tag}/linux -cp -rf "${current_dir}"/build/install/dist/* "${current_dir}"/build/dekvit-pipeline-${tag}/linux -cp -rf "${current_dir}"/build/download/dist/* "${current_dir}"/build/dekvit-pipeline-${tag}/linux +cp -rf "${current_dir}"/build/install_dependency/dist/* "${current_dir}"/build/dekvit-pipeline-${tag}/linux +cp -rf "${current_dir}"/build/download_dependency/dist/* "${current_dir}"/build/dekvit-pipeline-${tag}/linux cp -rf "${current_dir}"/build/distribute/devkit_distribute "${current_dir}"/build/dekvit-pipeline-${tag}/linux tar -zcvf dekvit-pipeline-${tag}.tar.gz dekvit-pipeline-${tag} diff --git a/tools/download_dependency/build_download.sh b/tools/download_dependency/build_download.sh index 6787ad2..8d0d3dc 100644 --- a/tools/download_dependency/build_download.sh +++ b/tools/download_dependency/build_download.sh @@ -8,10 +8,10 @@ project_dir=$(dirname $(dirname "${current_dir}")) umask 077 -build_dir=${project_dir}/build/download +build_dir=${project_dir}/build/download_dependency rm -rf "${build_dir}" mkdir -p "${build_dir}" cd "${build_dir}" -pyinstaller -F "${current_dir}"/src/download.py -p "${current_dir}"/src \ No newline at end of file +pyinstaller -F "${current_dir}"/src/download.py -p "${current_dir}"/src diff --git a/tools/install_dependency/build_install.sh b/tools/install_dependency/build_install.sh index 6744cbf..043022c 100644 --- a/tools/install_dependency/build_install.sh +++ b/tools/install_dependency/build_install.sh @@ -5,15 +5,15 @@ set -e current_dir=$(cd $(dirname "$0"); pwd) project_dir=$(dirname $(dirname "${current_dir}")) + umask 077 -build_dir=${project_dir}/build/install +build_dir=${project_dir}/build/install_dependency rm -rf "${build_dir}" mkdir -p "${build_dir}" cd "${build_dir}" -pyinstaller -F "${current_dir}"/src/devkitpipeline.py -p "${current_dir}/src:${project_dir}/tools/download_dependency/src" \ ---add-data "${project_dir}/component:component" +pyinstaller -F "${current_dir}"/src/devkitpipeline.py -p "${current_dir}/src:${project_dir}/tools/download_dependency/src" --add-data "../../component:component" cp "${current_dir}"/config/machine.yaml "${build_dir}"/dist/machine.yaml diff --git a/tools/install_dependency/src/command_line.py b/tools/install_dependency/src/command_line.py index 4c6dca7..1ae45db 100644 --- a/tools/install_dependency/src/command_line.py +++ b/tools/install_dependency/src/command_line.py @@ -13,7 +13,7 @@ class CommandLine: parser.add_argument("-f", "--config", action="store", dest="yaml_path", default=DEFAULT_YAML_PATH, help="Assign yaml config file path.") parser.add_argument("-iso", action="store", dest="iso_path", default=None, - help="Assign downloaded iso file path and deploy iso only.") + help="Assign prepared iso file path and deploy iso. Only deploy in executor and devkit machine.") parser.add_argument("--debug", action="store_true", dest="debug", default=False, help="Open debug log.") @classmethod diff --git a/tools/install_dependency/src/handler/gather_package.py b/tools/install_dependency/src/handler/gather_package.py index e71aaca..a5f4691 100644 --- a/tools/install_dependency/src/handler/gather_package.py +++ b/tools/install_dependency/src/handler/gather_package.py @@ -20,7 +20,7 @@ class GatherPackage(Handler): @staticmethod def deploy_iso_handle(): LOGGER.info("Iso file already checked.") - return True + return GatherPackage.default_handle() @staticmethod def default_handle(): diff --git a/tools/install_dependency/src/handler/install_package.py b/tools/install_dependency/src/handler/install_package.py index 3a1ddab..84cb23e 100644 --- a/tools/install_dependency/src/handler/install_package.py +++ b/tools/install_dependency/src/handler/install_package.py @@ -19,7 +19,7 @@ class InstallPackage(Handler): @staticmethod def deploy_iso_handle(data): - LOGGER.debug("Deploy iso start!") + LOGGER.debug("Deploy iso and install Package start!") ip_set = set() jobs = [] @@ -30,7 +30,7 @@ class InstallPackage(Handler): if machine_ip in ip_set: continue ip_set.add(machine_ip) - LOGGER.debug(f"ip_set: {ip_set}") + LOGGER.debug(f"ip_set to deploy iso: {ip_set}") machine = machine_dict.get(machine_ip) process = multiprocessing.Process( target=process_work, @@ -43,6 +43,8 @@ class InstallPackage(Handler): for job in jobs: job.join() + + InstallPackage.default_handle(data) return True @staticmethod diff --git a/tools/install_dependency/src/machine/builder_machine.py b/tools/install_dependency/src/machine/builder_machine.py index d10db3e..8ee4479 100644 --- a/tools/install_dependency/src/machine/builder_machine.py +++ b/tools/install_dependency/src/machine/builder_machine.py @@ -5,4 +5,4 @@ from machine.machine import Machine class BuilderMachine(Machine): def __init__(self, ip, user, pkey, password=None): super(BuilderMachine, self).__init__(ip, user, pkey, password) - self.role = constant.BUILDER \ No newline at end of file + self.role = constant.BUILDER diff --git a/tools/install_dependency/src/machine/scanner_machine.py b/tools/install_dependency/src/machine/scanner_machine.py index 07daec8..9377b52 100644 --- a/tools/install_dependency/src/machine/scanner_machine.py +++ b/tools/install_dependency/src/machine/scanner_machine.py @@ -5,4 +5,4 @@ from machine.machine import Machine class ScannerMachine(Machine): def __init__(self, ip, user, pkey, password=None): super(ScannerMachine, self).__init__(ip, user, pkey, password) - self.role = constant.SCANNER \ No newline at end of file + self.role = constant.SCANNER -- Gitee