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

Side by Side Diff: scripts/slave/zip_build.py

Issue 1687843002: Prune archives uploaded to google storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ Creates a zip file in the staging dir with the result of a compile. 6 """ Creates a zip file in the staging dir with the result of a compile.
7 It can be sent to other machines for testing. 7 It can be sent to other machines for testing.
8 """ 8 """
9 9
10 import csv 10 import csv
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 mojom_files = _MojomFiles(build_dir, ['.mojom.js', '_mojom.py']) 343 mojom_files = _MojomFiles(build_dir, ['.mojom.js', '_mojom.py'])
344 print 'Include mojom files: %s' % mojom_files 344 print 'Include mojom files: %s' % mojom_files
345 zip_file_list.extend(mojom_files) 345 zip_file_list.extend(mojom_files)
346 346
347 zip_file = MakeUnversionedArchive(build_dir, staging_dir, zip_file_list, 347 zip_file = MakeUnversionedArchive(build_dir, staging_dir, zip_file_list,
348 unversioned_base_name) 348 unversioned_base_name)
349 349
350 zip_base, zip_ext, versioned_file = MakeVersionedArchive( 350 zip_base, zip_ext, versioned_file = MakeVersionedArchive(
351 zip_file, version_suffix, options) 351 zip_file, version_suffix, options)
352 352
353 PruneOldArchives(staging_dir, zip_base, zip_ext, prune_limit=10) 353 prune_limit = 10
354 if options.build_url.startswith('gs://'):
355 # Don't keep builds lying around when uploading them to google storage.
356 prune_limit = 3
357 PruneOldArchives(staging_dir, zip_base, zip_ext, prune_limit=prune_limit)
354 358
355 # Update the latest revision file in the staging directory 359 # Update the latest revision file in the staging directory
356 # to allow testers to figure out the latest packaged revision 360 # to allow testers to figure out the latest packaged revision
357 # without downloading tarballs. 361 # without downloading tarballs.
358 revision_file = WriteRevisionFile(staging_dir, build_revision) 362 revision_file = WriteRevisionFile(staging_dir, build_revision)
359 363
360 if options.build_url.startswith('gs://'): 364 if options.build_url.startswith('gs://'):
361 zip_url = UploadToGoogleStorage( 365 zip_url = UploadToGoogleStorage(
362 versioned_file, revision_file, options.build_url, options.gs_acl) 366 versioned_file, revision_file, options.build_url, options.gs_acl)
363 367
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 # first unknown arg. So throw a warning if we have two or more unknown 449 # first unknown arg. So throw a warning if we have two or more unknown
446 # arguments. 450 # arguments.
447 if args[1:]: 451 if args[1:]:
448 print 'Warning -- unknown arguments' % args[1:] 452 print 'Warning -- unknown arguments' % args[1:]
449 453
450 return Archive(options) 454 return Archive(options)
451 455
452 456
453 if '__main__' == __name__: 457 if '__main__' == __name__:
454 sys.exit(main(sys.argv)) 458 sys.exit(main(sys.argv))
OLDNEW
« 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