Преглед на файлове

Ensure GCP image build instance gets cleaned up on teardown

Clayton Coleman преди 7 години
родител
ревизия
34dcc2d0b6
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  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
     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
 (
 (
 dns_zone="{{ dns_managed_zone | default(openshift_gcp_prefix + 'managed-zone') }}"
 dns_zone="{{ dns_managed_zone | default(openshift_gcp_prefix + 'managed-zone') }}"