Created
October 20, 2024 21:27
-
-
Save jkeam/c78307e9a9aa5869060283d1b86d9a5e to your computer and use it in GitHub Desktop.
Grabs the additional images required for a given OpenShift release and puts it in a format that can be pasted into an imageset.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib.request import urlopen | |
from re import sub | |
def read(version:str) -> None: | |
with urlopen(f"https://mirror.openshift.com/pub/openshift-v4/clients/ocp/{version}/release.txt") as f: | |
contents = f.read().decode('utf-8').split('\n') | |
for content in contents: | |
if 'quay.io' in content: | |
line = sub(r"^\s*[\w-]+\s*", "", content) | |
print(f" - name: {line}") | |
if __name__ == '__main__': | |
read('4.16.17') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment