test: enable gcp tests

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2018-02-14 22:39:14 +02:00
parent bbdfec667a
commit f109b69903
4 changed files with 23 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
import os
def get_env(name):
ret = os.getenv(name, None)
if not ret:
print("Failed to obtain env var {}. Skipping GCP setup.".format(name))
exit(0)
return ret
path = get_env("GOOGLE_APPLICATION_CREDENTIALS")
contents = get_env("GCP_CREDS")
with open(path, 'w+') as fd:
fd.write(contents)
+1
View File
@@ -21,3 +21,4 @@ printf "[default]\n" > ~/.aws/credentials
printf "aws_access_key_id = $AWS_ACCESS_KEY_ID\n" >> ~/.aws/credentials
printf "aws_secret_access_key = $AWS_SECRET_ACCESS_KEY\n" >> ~/.aws/credentials
printf "[default]\n" > ~/.aws/config
python scripts/ci/gcp_setup.py