File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,21 @@ def check_imagestreams(self) -> int:
97
97
print ("Imagestreams contains the latest version." )
98
98
return 0
99
99
100
+ def show_all_imagestreams (self ):
101
+ p = Path ("." )
102
+ json_files = p .glob (f"{ IMAGESTREAMS_DIR } /*.json" )
103
+ if not json_files :
104
+ print (f"No json files present in { IMAGESTREAMS_DIR } ." )
105
+ return 0
106
+ for f in json_files :
107
+ if os .environ .get ("TARGET" ) in ("rhel7" , "centos7" ) and "aarch64" in str (f ):
108
+ print ("Imagestream aarch64 is not supported on rhel7" )
109
+ continue
110
+ json_dict = self .load_json_file (f )
111
+ print (f"Tags in the image stream { f } :" )
112
+ for tag in json_dict ["spec" ]["tags" ]:
113
+ print (f"- { tag ['name' ]} -> { tag ['from' ]['name' ]} " )
114
+
100
115
101
116
if __name__ == "__main__" :
102
117
if len (sys .argv ) != 2 :
@@ -105,4 +120,5 @@ def check_imagestreams(self) -> int:
105
120
106
121
print (f"Version to check is { sys .argv [1 ]} ." )
107
122
isc = ImageStreamChecker (version = sys .argv [1 ])
123
+ isc .show_all_imagestreams ()
108
124
sys .exit (isc .check_imagestreams ())
Original file line number Diff line number Diff line change @@ -7,3 +7,7 @@ check_imagestreams=$(dirname "$(readlink -f "$0")")/../check_imagestreams.py
7
7
test $? -eq 1
8
8
" ${PYTHON-python3} " " $check_imagestreams " " 2.4"
9
9
test $? -eq 0
10
+ echo " Check full is output"
11
+ output=$( " ${PYTHON-python3} " " $check_imagestreams " " 2.4" )
12
+ test " ${output#* " - latest -> 2.4" } " ! = " $output " && echo " latest found in the output"
13
+ test " ${output#* " - 2.4 -> registry.redhat.io/rhscl/httpd-24-rhel7" } " ! = " $output " && echo " 2.4 found in the output"
You can’t perform that action at this time.
0 commit comments