diff options
author | Eric Boren <borenet@google.com> | 2017-09-15 09:56:24 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-15 14:15:03 +0000 |
commit | a32c47b0e2bbf5bca6f913581deed780165f8dc5 (patch) | |
tree | 84055d172249215812881ebf4cb8f849630741ed /infra | |
parent | f13beef28543aa2d7316cf16330ae4e817a06481 (diff) |
[infra] Always upload Gold images to the same bucket
But respect the passed-in bucket for verbose logs and JSON summary.
Bug: skia:
Change-Id: If57c16538802125c087b76991a0ca45b0a33beb2
Reviewed-on: https://skia-review.googlesource.com/46721
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra')
-rw-r--r-- | infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json | 134 | ||||
-rw-r--r-- | infra/bots/recipes/upload_dm_results.py | 11 |
2 files changed, 144 insertions, 1 deletions
diff --git a/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json b/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json new file mode 100644 index 0000000000..5fc4e20db8 --- /dev/null +++ b/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json @@ -0,0 +1,134 @@ +[ + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "ensure-directory", + "--mode", + "0777", + "[START_DIR]/tmp_upload" + ], + "infra_step": true, + "name": "makedirs tmp dir" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]/dm/dm.json", + "[START_DIR]/tmp_upload" + ], + "infra_step": true, + "name": "copy dm.json" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "copy", + "[START_DIR]/dm/verbose.log", + "[START_DIR]/tmp_upload" + ], + "infra_step": true, + "name": "copy verbose.log" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "remove", + "[START_DIR]/dm/dm.json" + ], + "infra_step": true, + "name": "rm old dm.json" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "remove", + "[START_DIR]/dm/verbose.log" + ], + "infra_step": true, + "name": "rm old verbose.log" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "glob", + "[START_DIR]/dm", + "*.png" + ], + "infra_step": true, + "name": "find images", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@glob@[START_DIR]/dm/someimage.png@@@", + "@@@STEP_LOG_END@glob@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "[START_DIR]/dm/*.png", + "gs://skia-infra-gm/dm-images-v1" + ], + "name": "upload images" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "glob", + "[START_DIR]/dm", + "*.pdf" + ], + "infra_step": true, + "name": "find images (2)", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@glob@[START_DIR]/dm/someimage.png@@@", + "@@@STEP_LOG_END@glob@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "-z", + "json,log", + "[START_DIR]/tmp_upload/*", + "gs://skia-infra-gm-alt/dm-json-v1/2012/05/14/12/abc123/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001" + ], + "name": "upload JSON and logs" + }, + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipes/upload_dm_results.py b/infra/bots/recipes/upload_dm_results.py index 61d52ac0cf..f83c5bf3bc 100644 --- a/infra/bots/recipes/upload_dm_results.py +++ b/infra/bots/recipes/upload_dm_results.py @@ -19,6 +19,7 @@ DEPS = [ ] +GS_BUCKET_IMAGES = 'skia-infra-gm' DM_JSON = 'dm.json' UPLOAD_ATTEMPTS = 5 VERBOSE_LOG = 'verbose.log' @@ -60,7 +61,7 @@ def RunSteps(api): api.file.remove('rm old verbose.log', log_file) # Upload the images. - image_dest_path = 'gs://%s/dm-images-v1' % api.properties['gs_bucket'] + image_dest_path = 'gs://%s/dm-images-v1' % GS_BUCKET_IMAGES for ext in ['.png', '.pdf']: files_to_upload = api.file.glob_paths( 'find images', @@ -109,6 +110,14 @@ def GenTests(api): ) yield ( + api.test('alternate_bucket') + + api.properties(buildername=builder, + gs_bucket='skia-infra-gm-alt', + revision='abc123', + path_config='kitchen') + ) + + yield ( api.test('failed_once') + api.properties(buildername=builder, gs_bucket='skia-infra-gm', |