diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-06-12 13:49:58 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-06-12 13:49:58 +0100 |
commit | 83ad5de637b884d97b3350a468b9a66c71507dca (patch) | |
tree | 6344200848b6da6b24a1fdbdb3cc2c4745ee6366 /qa/qa/service/kubernetes_cluster.rb | |
parent | 7f5703484b957718d4f9f576cf8ac22acc45c8de (diff) | |
parent | d94b162129ed7d3131efe7822a4f0c6b4991fb8e (diff) | |
download | gitlab-ce-fl-eslint-vue-house-keeping.tar.gz |
Merge branch 'master' into fl-eslint-vue-house-keepingfl-eslint-vue-house-keeping
* master: (47 commits)
Bumping gitlab-gollum-lib and gitlab-gollum-rugged_adapter
i18n: document how to use links without splitting sentences
Resolve "[Rails5] `ActionView::MissingTemplate` in spec/features/projects/wiki/user_views_wiki_page_spec.rb"
Add CI job to check Gemfile.rails5.lock
Add navigation theme documentation
Move Gitaly branch/tag/ref RPC's to opt-out
Add CI_{PIPELINE,JOB}_URL
Resolve "Update docs as GKE cluster creation label has changed from "project ID" to "project""
fixed/enhanced command-line documentation
Use nip.io instead of xip.io
[Rails5] Update Gitlab.rails5.lock
Fix typo in doc/development/README.md
Update import screenshot without LFS warning
Hide overflow on hr
Resolve "Milestone and labels dropdowns are misplaced with collapsed sidebar"
Fix collapse sidebar button color
Remove .row and .col-sm-12
Relax expectation in spec/models/project_spec.rb
fix padding in commit info
GitHub Rake importer: Fail with a clearer explanation if GitLab username is wrong
...
Diffstat (limited to 'qa/qa/service/kubernetes_cluster.rb')
-rw-r--r-- | qa/qa/service/kubernetes_cluster.rb | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/qa/qa/service/kubernetes_cluster.rb b/qa/qa/service/kubernetes_cluster.rb index 604bc522983..7627c8c7ad9 100644 --- a/qa/qa/service/kubernetes_cluster.rb +++ b/qa/qa/service/kubernetes_cluster.rb @@ -20,9 +20,11 @@ module QA gcloud container clusters create #{cluster_name} --enable-legacy-authorization - --zone us-central1-a + --zone #{Runtime::Env.gcloud_zone} && gcloud container clusters - get-credentials #{cluster_name} + get-credentials + --zone #{Runtime::Env.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 #{Runtime::Env.gcloud_zone} + #{cluster_name} + --quiet --async + CMD end private @@ -54,9 +61,9 @@ module QA def attempt_login_with_env_vars puts "No gcloud account. Attempting to login from env vars GCLOUD_ACCOUNT_EMAIL and GCLOUD_ACCOUNT_KEY." gcloud_account_key = Tempfile.new('gcloud-account-key') - gcloud_account_key.write(ENV.fetch("GCLOUD_ACCOUNT_KEY")) + gcloud_account_key.write(Runtime::Env.gcloud_account_key) gcloud_account_key.close - gcloud_account_email = ENV.fetch("GCLOUD_ACCOUNT_EMAIL") + gcloud_account_email = Runtime::Env.gcloud_account_email shell("gcloud auth activate-service-account #{gcloud_account_email} --key-file #{gcloud_account_key.path}") ensure gcloud_account_key && gcloud_account_key.unlink |