aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Edwards <jeremyje@gmail.com>2015-09-03 07:36:48 -0700
committerJeremy Edwards <jeremyje@gmail.com>2015-09-03 07:36:48 -0700
commitd79b09e8ad4d64008aceaeb789e884098cfc2c9a (patch)
tree829ca16eb2608d98edf1e4e6d25aecd2092f7cb1
parent43d132fa18791539f3c79ad9ebb1f4e3bc63109f (diff)
downloadcompute-archlinux-image-builder-d79b09e8ad4d64008aceaeb789e884098cfc2c9a.tar.xz
Fix upload and publish.
-rwxr-xr-xbuild-gce-arch.py21
1 files 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):