diff options
author | Antti Kokko <antti.kokko@qt.io> | 2021-02-23 07:50:58 +0200 |
---|---|---|
committer | Antti Kokko <antti.kokko@qt.io> | 2021-02-24 05:22:08 +0000 |
commit | c47ae74f853df016aed64d78975dc2298b5da01b (patch) | |
tree | 4adb1c1cf6be3aace505fb1d5e2b32cb3791349a | |
parent | 9f82ac2d75998856d2f685cb6daca7fd23a4d2f4 (diff) |
release_repo_updater.py: Add edition component for sync logs pathv6.1.0-beta1-packaging
Write ext sync logs per edition, this makes it easier to find correct
logs.
Change-Id: I9e9c892bc143c958a7465005f31830b9b1138168
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
-rwxr-xr-x | packaging-tools/qt6_installer/release_repo_updater.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/packaging-tools/qt6_installer/release_repo_updater.py b/packaging-tools/qt6_installer/release_repo_updater.py index 6a23c914d..0ab6a0294 100755 --- a/packaging-tools/qt6_installer/release_repo_updater.py +++ b/packaging-tools/qt6_installer/release_repo_updater.py @@ -3,7 +3,7 @@ ############################################################################# ## -## Copyright (C) 2020 The Qt Company Ltd. +## Copyright (C) 2021 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the release tools of the Qt Toolkit. @@ -270,8 +270,9 @@ def create_remote_repository_backup(server: str, remote_repo_path: str) -> None: return backup_path -def sync_production_repositories_to_s3(server: str, s3: str, updatedProductionRepositories: Dict[str, str], remoteRootPath: str) -> None: - remoteLogsBasePath = os.path.join(remoteRootPath, "s3_sync_logs") +def sync_production_repositories_to_s3(server: str, s3: str, updatedProductionRepositories: Dict[str, str], + remoteRootPath: str, license: str) -> None: + remoteLogsBasePath = os.path.join(remoteRootPath, license, "s3_sync_logs") create_remote_paths(server, [remoteLogsBasePath]) for repo, remoteProductionRepoFullPath in updatedProductionRepositories.items(): @@ -303,8 +304,9 @@ def sync_production_xml_to_s3(server: str, serverHome: str, productionRepoPath: spawn_remote_background_task(server, serverHome, cmd, remoteLogFile, tip=tip + "xml") -async def sync_production_repositories_to_ext(server: str, ext: str, updatedProductionRepositories: Dict[str, str], remoteRootPath: str) -> None: - remoteLogsBasePath = os.path.join(remoteRootPath, "ext_sync_logs") +async def sync_production_repositories_to_ext(server: str, ext: str, updatedProductionRepositories: Dict[str, str], + remoteRootPath: str, license: str) -> None: + remoteLogsBasePath = os.path.join(remoteRootPath, license, "ext_sync_logs") create_remote_paths(server, [remoteLogsBasePath]) extServer, extBasePath = parse_ext(ext) @@ -427,7 +429,7 @@ async def update_repositories(tasks: List[ReleaseTask], stagingServer: str, stag async def sync_production(tasks: List[ReleaseTask], repoLayout: QtRepositoryLayout, syncS3: str, syncExt: str, - stagingServer: str, stagingServerRoot: str) -> None: + stagingServer: str, stagingServerRoot: str, license: str) -> None: log.info("triggering production sync..") # collect production sync jobs updatedProductionRepositories = {} # type: Dict[str, str] @@ -439,9 +441,9 @@ async def sync_production(tasks: List[ReleaseTask], repoLayout: QtRepositoryLayo # if _all_ repository updates to production were successful then we can sync to production if syncS3: - sync_production_repositories_to_s3(stagingServer, syncS3, updatedProductionRepositories, stagingServerRoot) + sync_production_repositories_to_s3(stagingServer, syncS3, updatedProductionRepositories, stagingServerRoot, license) if syncExt: - await sync_production_repositories_to_ext(stagingServer, syncExt, updatedProductionRepositories, stagingServerRoot) + await sync_production_repositories_to_ext(stagingServer, syncExt, updatedProductionRepositories, stagingServerRoot, license) log.info("Production sync trigger done!") @@ -460,7 +462,7 @@ async def handle_update(stagingServer: str, stagingServerRoot: str, license: str if updateRepositories: await update_repositories(tasks, stagingServer, stagingServerRoot, repoLayout, updateStaging, updateProduction, rta, ifwTools) if syncRepositories: - await sync_production(tasks, repoLayout, syncS3, syncExt, stagingServer, stagingServerRoot) + await sync_production(tasks, repoLayout, syncS3, syncExt, stagingServer, stagingServerRoot, license) log.info("Repository updates done!") return ret |