From d79b09e8ad4d64008aceaeb789e884098cfc2c9a Mon Sep 17 00:00:00 2001 From: Jeremy Edwards Date: Thu, 3 Sep 2015 07:36:48 -0700 Subject: Fix upload and publish. --- build-gce-arch.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/build-gce-arch.py b/build-gce-arch.py index 5a3e2b8..f64dfb3 100755 --- a/build-gce-arch.py +++ b/build-gce-arch.py @@ -183,22 +183,25 @@ def SaveImage(arch_root, image_filename): def UploadImage(image_path, gs_path, make_public=False): utils.LogStep('Upload Image to Cloud Storage') utils.SecureDeleteFile('~/.gsutil/*.url') - utils.Run(['gsutil', 'rm', gs_path]) - utils.Run(['gsutil', 'cp', image_path, gs_path]) + utils.Run(['gsutil', 'rm', gs_path], + env={'CLOUDSDK_PYTHON': '/usr/bin/python2'}) + utils.Run(['gsutil', 'cp', image_path, gs_path], + env={'CLOUDSDK_PYTHON': '/usr/bin/python2'}) if make_public: - utils.Run(['gsutil', 'acl', 'set', 'public-read', gs_path]) + utils.Run(['gsutil', 'acl', 'set', 'public-read', gs_path], + env={'CLOUDSDK_PYTHON': '/usr/bin/python2'}) def AddImageToComputeEngineProject(image_name, gs_path, description): utils.LogStep('Add image to project') utils.Run( - ['gcloud', 'compute', 'images', 'delete', image_name, '-q'], - env={'CLOUDSDK_PYTHON': '/usr/bin/python2'}) + ['gcloud', 'compute', 'images', 'delete', image_name, '-q'], + env={'CLOUDSDK_PYTHON': '/usr/bin/python2'}) utils.Run( - ['gcloud', 'compute', 'images', 'create', image_name, '-q', - '--source-uri', gs_path, - '--description', description], - env={'CLOUDSDK_PYTHON': '/usr/bin/python2'}) + ['gcloud', 'compute', 'images', 'create', image_name, '-q', + '--source-uri', gs_path, + '--description', description], + env={'CLOUDSDK_PYTHON': '/usr/bin/python2'}) def GetImageNameAndDescription(outfile_name): -- cgit v1.3