aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipes
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2018-01-16 16:06:09 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-17 12:29:26 +0000
commitd452434d1717aa42993a4c671ffc5625fe273957 (patch)
tree93c1a5efe943c0bda904324ef164da9e94374eed /infra/bots/recipes
parent279643019e2029a31ec0511d48d4bdbff32d7ab4 (diff)
Upload multiple dm images at once
Use the -m file, as recommended in https://luci-milo.appspot.com/swarming/task/3b197fbd667a1510/steps/upload_images/0/stdout Bug: skia: Change-Id: I58d101f58594bf221d11a787057ee7950b197f86 Reviewed-on: https://skia-review.googlesource.com/94965 Reviewed-by: Stephan Altmueller <stephana@google.com> Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'infra/bots/recipes')
-rw-r--r--infra/bots/recipes/upload_coverage_results.py8
-rw-r--r--infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json1
-rw-r--r--infra/bots/recipes/upload_dm_results.expected/failed_all.json5
-rw-r--r--infra/bots/recipes/upload_dm_results.expected/failed_once.json2
-rw-r--r--infra/bots/recipes/upload_dm_results.expected/normal_bot.json1
-rw-r--r--infra/bots/recipes/upload_dm_results.expected/trybot.json1
-rw-r--r--infra/bots/recipes/upload_dm_results.py4
7 files changed, 16 insertions, 6 deletions
diff --git a/infra/bots/recipes/upload_coverage_results.py b/infra/bots/recipes/upload_coverage_results.py
index fd9a24ec8e..91fa79c2dd 100644
--- a/infra/bots/recipes/upload_coverage_results.py
+++ b/infra/bots/recipes/upload_coverage_results.py
@@ -91,7 +91,7 @@ def RunSteps(api):
gcs_file = PARSED_FILE % builder_name
api.gsutil.cp('parsed data', indexed_data,
- 'gs://%s/%s%s' % (bucket, path, gcs_file), ['-Z'])
+ 'gs://%s/%s%s' % (bucket, path, gcs_file), extra_args=['-Z'])
# Create text coverage output
output_data = api.path['start_dir'].join('coverage_text')
@@ -108,7 +108,7 @@ def RunSteps(api):
# downloading and untarring all the coverage data.
gcs_file = SUMMARY_FILE % builder_name
api.gsutil.cp('coverage summary', output_data.join('index.txt'),
- 'gs://%s/%s%s' % (bucket, path, gcs_file), ['-Z'])
+ 'gs://%s/%s%s' % (bucket, path, gcs_file), extra_args=['-Z'])
tar_file = api.path['start_dir'].join('coverage.text.tar')
@@ -119,7 +119,7 @@ def RunSteps(api):
gcs_file = COVERAGE_TEXT_FILE % builder_name
api.gsutil.cp('text coverage data', tar_file,
- 'gs://%s/%s%s' % (bucket, path, gcs_file), ['-Z'])
+ 'gs://%s/%s%s' % (bucket, path, gcs_file), extra_args=['-Z'])
# Create html coverage output
output_data = api.path['start_dir'].join('coverage_html')
@@ -141,7 +141,7 @@ def RunSteps(api):
gcs_file = COVERAGE_HTML_FILE % builder_name
api.gsutil.cp('html coverage data', tar_file,
- 'gs://%s/%s%s' % (bucket, path, gcs_file), ['-Z'])
+ 'gs://%s/%s%s' % (bucket, path, gcs_file), extra_args=['-Z'])
def GenTests(api):
diff --git a/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json b/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json
index 27319c8dbc..fca5954dd0 100644
--- a/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json
+++ b/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json
@@ -90,6 +90,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
diff --git a/infra/bots/recipes/upload_dm_results.expected/failed_all.json b/infra/bots/recipes/upload_dm_results.expected/failed_all.json
index 563b37d1ae..3d643abb6f 100644
--- a/infra/bots/recipes/upload_dm_results.expected/failed_all.json
+++ b/infra/bots/recipes/upload_dm_results.expected/failed_all.json
@@ -90,6 +90,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
@@ -103,6 +104,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
@@ -116,6 +118,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
@@ -129,6 +132,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
@@ -142,6 +146,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
diff --git a/infra/bots/recipes/upload_dm_results.expected/failed_once.json b/infra/bots/recipes/upload_dm_results.expected/failed_once.json
index 1e6afe841c..c2531d9e24 100644
--- a/infra/bots/recipes/upload_dm_results.expected/failed_once.json
+++ b/infra/bots/recipes/upload_dm_results.expected/failed_once.json
@@ -90,6 +90,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
@@ -103,6 +104,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
diff --git a/infra/bots/recipes/upload_dm_results.expected/normal_bot.json b/infra/bots/recipes/upload_dm_results.expected/normal_bot.json
index 247a612e02..4a8fd11bf4 100644
--- a/infra/bots/recipes/upload_dm_results.expected/normal_bot.json
+++ b/infra/bots/recipes/upload_dm_results.expected/normal_bot.json
@@ -90,6 +90,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
diff --git a/infra/bots/recipes/upload_dm_results.expected/trybot.json b/infra/bots/recipes/upload_dm_results.expected/trybot.json
index 3ea86e0033..5a10528d1d 100644
--- a/infra/bots/recipes/upload_dm_results.expected/trybot.json
+++ b/infra/bots/recipes/upload_dm_results.expected/trybot.json
@@ -90,6 +90,7 @@
{
"cmd": [
"gsutil",
+ "-m",
"cp",
"[START_DIR]/dm/*.png",
"gs://skia-infra-gm/dm-images-v1"
diff --git a/infra/bots/recipes/upload_dm_results.py b/infra/bots/recipes/upload_dm_results.py
index a46c787d26..7d08089a1d 100644
--- a/infra/bots/recipes/upload_dm_results.py
+++ b/infra/bots/recipes/upload_dm_results.py
@@ -53,7 +53,7 @@ def RunSteps(api):
files_to_upload = [f for f in files_to_upload if str(f).endswith(ext)]
if len(files_to_upload) > 0:
api.gsutil.cp('images', results_dir.join('*%s' % ext),
- image_dest_path)
+ image_dest_path, multithread=True)
# Upload the JSON summary and verbose.log.
now = api.time.utcnow()
@@ -78,7 +78,7 @@ def RunSteps(api):
summary_dest_path)
api.gsutil.cp('JSON and logs', tmp_dir.join('*'), summary_dest_path,
- ['-z', 'json,log'])
+ extra_args=['-z', 'json,log'])
def GenTests(api):