Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(746)

Unified Diff: mojo/services/upload_service.py

Issue 956593003: Publish location files for Mojo binaries uploaded from Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/upload_service.py
diff --git a/mojo/services/upload_service.py b/mojo/services/upload_service.py
index ea528b3a39f7361fff98489773a6d997250c38a1..ca8e6c3ed0b02e7dddfb3b843adfea91274676ad 100755
--- a/mojo/services/upload_service.py
+++ b/mojo/services/upload_service.py
@@ -74,8 +74,19 @@ def upload_binary(service, binary_dir, platform, dry_run):
absolute_binary_path = os.path.join(root_path, binary_dir, binary_name)
if not should_zip:
+ # Upload the binary.
dest = dest_dir + binary_name
gsutil_cp(absolute_binary_path, dest, dry_run)
+
+ # Update the pointer to the service's location to point to the
+ # newly-uploaded binary.
+ service_location = dest.replace("gs://", "https://storage.googleapis.com/")
+ location_file = ("gs://mojo/services/" + platform + "/" + service +
+ "_location")
jamesr 2015/02/24 22:07:19 what information are we uploading here that isn't
blundell 2015/02/25 13:07:31 gs://mojo/services/<platform>/<service>_location i
+ with tempfile.NamedTemporaryFile() as tmp:
+ tmp.write(service_location)
+ tmp.flush()
+ gsutil_cp(tmp.name, location_file, dry_run)
return
# Zip the binary before uploading it to the cloud.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698