Quellcode durchsuchen

Ensure GCP image build instance gets cleaned up on teardown

Clayton Coleman vor 7 Jahren
Ursprung
Commit
34dcc2d0b6
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. 6 0
      roles/openshift_gcp/templates/remove.j2.sh

+ 6 - 0
roles/openshift_gcp/templates/remove.j2.sh

@@ -68,6 +68,12 @@ fi
     done
 ) &
 
+# Instances and disks used for image building
+(
+    teardown "{{ openshift_gcp_prefix }}build-image-instance" compute instances --zone "{{ openshift_gcp_zone }}"
+    teardown "{{ openshift_gcp_prefix }}build-image-instance" compute disks --zone "{{ openshift_gcp_zone }}"
+) &
+
 # DNS
 (
 dns_zone="{{ dns_managed_zone | default(openshift_gcp_prefix + 'managed-zone') }}"