Commit 5512c214 authored by Dylan Griffith's avatar Dylan Griffith

Ensure --zone is passed to all gcloud commands for auto devops cluster specs

parent 2c05c857
......@@ -20,9 +20,11 @@ module QA
gcloud container clusters
create #{cluster_name}
--enable-legacy-authorization
--zone us-central1-a
--zone #{gcloud_zone}
&& gcloud container clusters
get-credentials #{cluster_name}
get-credentials
--zone #{gcloud_zone}
#{cluster_name}
CMD
@api_url = `kubectl config view --minify -o jsonpath='{.clusters[].cluster.server}'`
......@@ -32,7 +34,12 @@ module QA
end
def remove!
shell("gcloud container clusters delete #{cluster_name} --quiet --async")
shell <<~CMD.tr("\n", ' ')
gcloud container clusters delete
--zone #{gcloud_zone}
#{cluster_name}
--quiet --async
CMD
end
private
......@@ -61,6 +68,10 @@ module QA
ensure
gcloud_account_key && gcloud_account_key.unlink
end
def gcloud_zone
ENV.fetch('GCLOUD_ZONE')
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment