Sfoglia il codice sorgente

Ensure GCP image build instance gets cleaned up on teardown

Clayton Coleman 7 anni fa
parent
commit
34dcc2d0b6
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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') }}"