Invoke cos-gpu-installer integration tests for cos-117 and newer.

Change-Id: I4ee38192cc8db8b90139d35518afb1eff80c8ed6
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/81239
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
Tested-by: Arnav Kansal <rnv@google.com>
Reviewed-by: Shuo Yang <gshuoy@google.com>
diff --git a/release/tests/gpu-installer-verifier.py b/release/tests/gpu-installer-verifier.py
index cb0b61c..f337bf1 100644
--- a/release/tests/gpu-installer-verifier.py
+++ b/release/tests/gpu-installer-verifier.py
@@ -27,6 +27,29 @@
                 return item['build_tag']
     return None
 
+def get_cos_images():
+  """
+  Retrieves a list of COS image families from gcloud
+  Excludes ARM64 image families.
+
+  Returns:
+    A list of strings, where each string is a COS image fanily name.
+  """
+  try:
+    # Run the gcloud command and capture the output
+    command = "gcloud compute images list --no-standard-images --project=cos-cloud | awk '{print $3}' | tail -n +2 | grep -v arm"
+    process = subprocess.run(command, shell=True, capture_output=True, text=True)
+    if process.returncode != 0:
+      printf(f"Error executing gcloud command: {process.stderr}")
+      return []
+    output = process.stdout.strip()
+    image_list = output.splitlines()
+    return image_list
+
+  except Exception as e:
+    print(f"An error occurred: {e}")
+    return []
+
 def main():
     logging.basicConfig(stream=sys.stdout, level=logging.INFO)
     _PROJECT_ID = sys.argv[1]
@@ -39,11 +62,7 @@
     _IMAGE_PROJECT="cos-cloud"
     _DAISY_GCS_BUCKET="{}-daisy-bkt".format(_PROJECT_ID.replace('google.com:', 'elgoog_com_'))
 
-    image_families = ['cos-113-lts',
-                      'cos-109-lts',
-                      'cos-105-lts',
-                      'cos-101-lts'
-                      ]
+    image_families = get_cos_images()
     gpu_resources =[
         GPUResource(
             device_name='nvidia-tesla-p4',
@@ -102,4 +121,4 @@
     sys.exit(0)
 
 if __name__=='__main__':
-    main()
\ No newline at end of file
+    main()