diff --git a/apps_ci/scripts/catalog_update.py b/apps_ci/scripts/catalog_update.py index cb1c51d..f295ced 100644 --- a/apps_ci/scripts/catalog_update.py +++ b/apps_ci/scripts/catalog_update.py @@ -40,6 +40,17 @@ def get_trains(location: str) -> typing.Tuple[dict, dict]: else: catalog_data[train_name][app_name][k] = v + # We will add capabilities and run as context from latest version to catalog data now + latest_version = app_data.get('latest_version') + metadata_info = {'capabilities': [], 'run_as_context': []} + if latest_version in app_data.get('versions', {}): + version_metadata_info = app_data['versions'][latest_version].get('app_metadata', {}) + metadata_info.update({ + 'capabilities': version_metadata_info.get('capabilities', metadata_info['capabilities']), + 'run_as_context': version_metadata_info.get('run_as_context', metadata_info['run_as_context']), + }) + catalog_data[train_name][app_name].update(metadata_info) + return catalog_data, versions_data