From 035b48f7b074a570e7797e6b9d3949f471502b2e Mon Sep 17 00:00:00 2001 From: cc <18856836718@163.com> Date: Fri, 31 May 2024 18:52:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9compatibility=5Ftesting?= =?UTF-8?q?=20=E4=B8=8B=E8=BD=BD=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/download/download_config.py | 2 +- tools/download_and_deploy/src/download_main.py | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tools/download_and_deploy/src/download/download_config.py b/tools/download_and_deploy/src/download/download_config.py index 207a830..cc1c7f6 100644 --- a/tools/download_and_deploy/src/download/download_config.py +++ b/tools/download_and_deploy/src/download/download_config.py @@ -21,7 +21,7 @@ BiShengJDK17 = { CompatibilityTesting = { "component_name": "CompatibilityTesting", - "file": "https://gitee.com/bdgl/devkit-pipeline/releases/download/compatibility_testing-v1.2/compatibility_testing.tar.gz", + "file": "https://gitee.com/openeuler/devkit-pipeline/releases/download/v1.0.1/compatibility_testing.tar.gz", "file_size": "76451308", } diff --git a/tools/download_and_deploy/src/download_main.py b/tools/download_and_deploy/src/download_main.py index d577f78..8fe76cb 100644 --- a/tools/download_and_deploy/src/download_main.py +++ b/tools/download_and_deploy/src/download_main.py @@ -20,11 +20,9 @@ PIPELINE = [BaseCheck(), GatherPackage(), CompressDep()] iso_collection_map = { component.get("component_name"): { - "download file": { - URL: f"{component.get(FILE)}", - SAVE_PATH: f"{os.path.join('./', component.get(FILE).split('/')[-1])}", - FILE_SIZE: f"{component.get(FILE_SIZE)}", - }, + URL: f"{component.get(FILE)}", + SAVE_PATH: f"{os.path.join('./', component.get(FILE).split('/')[-1])}", + FILE_SIZE: f"{component.get(FILE_SIZE)}", } for component in ( download_config.OpenEuler_2003_LTS, download_config.OpenEuler_2003_LTS_SP1, @@ -65,11 +63,11 @@ def download_iso(): .replace("-", "_")) print(f"Auto detect operating system version: {CommandLine.download_iso}") - shell_dict = iso_collection_map.get(CommandLine.download_iso, "") - if not shell_dict: + url_and_save_path = iso_collection_map.get(CommandLine.download_iso, "") + if not url_and_save_path: print("Please check /etc/os-release is changed or not.") return False - return download_dependence_file("download file", shell_dict) + return download_dependence_file(url_and_save_path) if __name__ == '__main__': -- Gitee From 4e6ca2db1f1762ea1045e757e8c6ddf5c94c40f9 Mon Sep 17 00:00:00 2001 From: cc <18856836718@163.com> Date: Fri, 31 May 2024 19:46:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9DevKitWeb=20=E5=9C=A8=20/?= =?UTF-8?q?opt=E7=9B=AE=E5=BD=95=E4=B8=8B=E5=B7=B2=E7=BB=8F=E5=AD=98?= =?UTF-8?q?=E5=9C=A8DevKit=E5=AE=89=E8=A3=85=E5=8C=85=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B=20=E7=9A=84=E5=AE=89=E8=A3=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/component_install/devkitweb_deploy.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/download_and_deploy/src/component_install/devkitweb_deploy.py b/tools/download_and_deploy/src/component_install/devkitweb_deploy.py index 8cf7ba1..d244a0e 100644 --- a/tools/download_and_deploy/src/component_install/devkitweb_deploy.py +++ b/tools/download_and_deploy/src/component_install/devkitweb_deploy.py @@ -27,7 +27,13 @@ class DevkitWebDeploy(DeployBase): f"remote_file: {remote_file}") # cls.remote_file_list.append(remote_file) - sftp_client.put(localpath=f"{local_file}", remotepath=f"{remote_file}") + try: + sftp_client.put(localpath=f"{local_file}", remotepath=f"{remote_file}") + except Exception as e: + devkitweb_prompt = f"Remote machine copy {cls.component_name} failed. " \ + f"Please check /opt write permission and /opt/DevKit-All-24.0.RC1-Linux-Kunpeng.tar.gz exists." + LOGGER.error(devkitweb_prompt) + raise IOError(devkitweb_prompt) @classmethod def install(cls, machine, sftp_client, ssh_client): -- Gitee