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

Unified Diff: slave/skia_slave_scripts/utils/upload_to_bucket.py

Issue 648353002: Remove Skia's forked buildbot code (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Address comment Created 6 years, 2 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
Index: slave/skia_slave_scripts/utils/upload_to_bucket.py
diff --git a/slave/skia_slave_scripts/utils/upload_to_bucket.py b/slave/skia_slave_scripts/utils/upload_to_bucket.py
deleted file mode 100755
index 8bf496b588ca1a520b81a0e69a1efc6e2d7d3532..0000000000000000000000000000000000000000
--- a/slave/skia_slave_scripts/utils/upload_to_bucket.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Upload a single file to a Google Storage Bucket.
-
-To test:
- cd .../buildbot/slave/skia_slave_scripts/utils
- CR_BUILDBOT_PATH=../../../third_party/chromium_buildbot
- PYTHONPATH=$CR_BUILDBOT_PATH/scripts:$CR_BUILDBOT_PATH/site_config \
- python upload_to_bucket.py \
- --source_filepath=../../../DEPS --dest_gsbase=gs://chromium-skia-gm
-"""
-
-from py.utils import misc
-import optparse
-import os
-import sys
-
-from slave import slave_utils
-
-def upload_to_bucket(source_filepath, dest_gsbase, subdir=None):
- abs_source_filepath = misc.GetAbsPath(source_filepath)
- print 'translated source_filepath %s to absolute path %s' % (
- source_filepath, abs_source_filepath)
- if not os.path.exists(abs_source_filepath):
- raise Exception('ERROR: file not found: %s' % abs_source_filepath)
- status = slave_utils.GSUtilCopyFile(abs_source_filepath, dest_gsbase,
- subdir=subdir,
- gs_acl='public-read')
- if status != 0:
- raise Exception('ERROR: GSUtilCopyFile error %d. "%s" -> "%s"' % (
- status, abs_source_filepath, dest_gsbase))
- return 0
-
-
-def main(argv):
- option_parser = optparse.OptionParser()
- option_parser.add_option(
- '', '--source_filepath',
- help='full path of the file we wish to upload')
- option_parser.add_option(
- '', '--dest_gsbase',
- help='gs:// bucket_name, the bucket to upload the file to')
- option_parser.add_option(
- '', '--subdir',
- help='optional subdirectory within the bucket',
- default=None)
- (options, _args) = option_parser.parse_args()
- return upload_to_bucket(source_filepath=options.source_filepath,
- dest_gsbase=options.dest_gsbase,
- subdir=options.subdir)
-
-
-if '__main__' == __name__:
- sys.exit(main(None))
« no previous file with comments | « slave/skia_slave_scripts/utils/sync_skia_in_chrome.py ('k') | slave/skia_slave_scripts/webpages_playback.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698