INNER CODE UNIT · Python

run

jupyterhub/zero-to-jupyterhub-k8s · tools/set-chart-yaml-annotations.py:42

def run():
    with open(values_yaml) as f:
        values = yaml.safe_load(f)

    images = find_images(values)

    images_artifacthub_format = textwrap.indent(
        yaml.dump(
            [{"name": i.split(":")[0].split("/")[-1], "image": i} for i in images]
        ),
        "    ",
    )
    chart_yaml_appendix = (
        "annotations:\n" + '  "artifacthub.io/images": |\n' + images_artifacthub_format
    )

    print("Appending the following to Chart.yaml:\n")
    print(chart_yaml_appendix)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…