Commit 8a00c6b8 authored by Dan Davison's avatar Dan Davison Committed by Thong Kuah

Add support for controlling amount of nodes

Nodes spun up in Gcloud defaults to '3' nodes
This number can be a lot considering the QA
autodevops spec does not need this many nodes
parent ed85fcfa
......@@ -181,6 +181,10 @@ module QA
ENV.fetch('GCLOUD_REGION')
end
def gcloud_num_nodes
ENV.fetch('GCLOUD_NUM_NODES', 3)
end
def has_gcloud_credentials?
%w[GCLOUD_ACCOUNT_KEY GCLOUD_ACCOUNT_EMAIL].none? { |var| ENV[var].to_s.empty? }
end
......
......@@ -30,6 +30,7 @@ module QA
--enable-basic-auth
--region #{Runtime::Env.gcloud_region}
--disk-size 10GB
--num-nodes #{Runtime::Env.gcloud_num_nodes}
&& gcloud container clusters
get-credentials
--region #{Runtime::Env.gcloud_region}
......
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