summaryrefslogtreecommitdiff
path: root/qa/qa/runtime
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-07-03 16:13:54 +0200
committerDylan Griffith <dyl.griffith@gmail.com>2018-07-03 17:48:03 +0200
commit2a8d0b59a37be30e27255220b911c6d052ca48e1 (patch)
treee928d59a197c213915d6b00f90e4c846fc481a79 /qa/qa/runtime
parent00518d261d2e5b751bb5da93531880d4b3eb4250 (diff)
downloadgitlab-ce-2a8d0b59a37be30e27255220b911c6d052ca48e1.tar.gz
Auto DevOps QA: Prefer gcloud credentials from env
Diffstat (limited to 'qa/qa/runtime')
-rw-r--r--qa/qa/runtime/env.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb
index 81d00d45753..4db76a57f96 100644
--- a/qa/qa/runtime/env.rb
+++ b/qa/qa/runtime/env.rb
@@ -58,6 +58,10 @@ module QA
def gcloud_zone
ENV.fetch('GCLOUD_ZONE')
end
+
+ def has_gcloud_credentials?
+ %w[GCLOUD_ACCOUNT_KEY GCLOUD_ACCOUNT_EMAIL].none? { |var| ENV[var].to_s.empty? }
+ end
end
end
end