mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
download: Update yaml data with new hashes
This commit is contained in:
@@ -184,6 +184,10 @@ def download_hash(only_downloads: [str]) -> None:
|
|||||||
],
|
],
|
||||||
strict=True))
|
strict=True))
|
||||||
|
|
||||||
|
components_supported_arch = {
|
||||||
|
component.removesuffix('_checksums'): [a for a in archs.keys()]
|
||||||
|
for component, archs in data.items()
|
||||||
|
}
|
||||||
new_versions = {
|
new_versions = {
|
||||||
c:
|
c:
|
||||||
{v for v in github_versions[c]
|
{v for v in github_versions[c]
|
||||||
@@ -216,6 +220,21 @@ def download_hash(only_downloads: [str]) -> None:
|
|||||||
return (hash_file.content.decode().split()[0])
|
return (hash_file.content.decode().split()[0])
|
||||||
|
|
||||||
|
|
||||||
|
for component, versions in new_versions.items():
|
||||||
|
c = component + '_checksums'
|
||||||
|
for arch in components_supported_arch[component]:
|
||||||
|
for version in versions:
|
||||||
|
data[c][arch][str(version)] = f"{downloads[component].get('hashtype', 'sha256')}:{get_hash(component, version, arch)}"
|
||||||
|
|
||||||
|
data[c] = {arch :
|
||||||
|
{v :
|
||||||
|
versions[v] for v in sorted(versions.keys(),
|
||||||
|
key=Version,
|
||||||
|
reverse=True)
|
||||||
|
}
|
||||||
|
for arch, versions in data[c].items()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
with open(CHECKSUMS_YML, "w") as checksums_yml:
|
with open(CHECKSUMS_YML, "w") as checksums_yml:
|
||||||
yaml.dump(data, checksums_yml)
|
yaml.dump(data, checksums_yml)
|
||||||
|
|||||||
Reference in New Issue
Block a user