diff --git a/build.sh b/build.sh index edd02abf86b6f63fdce39ac21ae3b341069e4e74..3ea072b62f8f95350e753876c0e815bcbf12a39d 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 6787ad26f5da47172eaf7445812d85da235dc873..8d0d3dcf3afe6c2256671bc5af36d71be98ddfa7 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 6744cbf9009763508626b26e464114b05c2fa7db..043022c1889ce18c32b432d54cfc8ef368416359 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 4c6dca7e91ed6ed7ebecc351e96ade2588a6333b..1ae45db1f9178a7d95b2b48c94a2bf70ff2c7680 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 e71aaca5985debea7f1b61d68f4ac008becd72c2..a5f469197359f28793f35372f611f87d4f5c8cce 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 3a1ddabc380d321f8179d1a2324414ce7a76861a..84cb23e105665df31659b390940f7ead21e291c0 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 d10db3ee966bfc902c2dd849fac0dbfddf5e8f58..8ee4479e37a5800eaf9f829d1115739e3fb82120 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 07daec8b50a9752e9c6ca20a839320d99060e9d6..9377b527f8b9a0507156b71be16f3ec62d97c2e0 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