| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Steps to archive dartium, content_shell, and chromedriver from buildbots. | 7 """Steps to archive dartium, content_shell, and chromedriver from buildbots. |
| 8 | 8 |
| 9 Imported by buildbot_annotated_steps.py and multivm_archive.py | 9 Imported by buildbot_annotated_steps.py and multivm_archive.py |
| 10 """ | 10 """ |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 """ | 167 """ |
| 168 print '@@@BUILD_STEP %s_upload_archive @@@' % module | 168 print '@@@BUILD_STEP %s_upload_archive @@@' % module |
| 169 revision = 'latest' if archive_latest else info.revision | 169 revision = 'latest' if archive_latest else info.revision |
| 170 name = module.replace('drt', 'content_shell') | 170 name = module.replace('drt', 'content_shell') |
| 171 namer = bot_utils.GCSNamer(info.channel, bot_utils.ReleaseType.RAW) | 171 namer = bot_utils.GCSNamer(info.channel, bot_utils.ReleaseType.RAW) |
| 172 remote_path = namer.dartium_variant_zipfilepath(revision, | 172 remote_path = namer.dartium_variant_zipfilepath(revision, |
| 173 name, | 173 name, |
| 174 sys.platform, | 174 sys.platform, |
| 175 info.arch, | 175 info.arch, |
| 176 info.mode.lower()) | 176 info.mode.lower()) |
| 177 UploadFile(zip_file, remote_path, create_md5sum=True) | 177 UploadFile(zip_file, remote_path, checksum_files=True) |
| 178 | 178 |
| 179 print '@@@STEP_LINK@download@' + remote_path + '@@@' | 179 print '@@@STEP_LINK@download@' + remote_path + '@@@' |
| 180 | 180 |
| 181 | 181 |
| 182 def OldUploadFile(source, target): | 182 def OldUploadFile(source, target): |
| 183 """Upload an archive zip file to Google storage. | 183 """Upload an archive zip file to Google storage. |
| 184 """ | 184 """ |
| 185 | 185 |
| 186 # Upload file. | 186 # Upload file. |
| 187 cmd = [GSUTIL, 'cp', source, target] | 187 cmd = [GSUTIL, 'cp', source, target] |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 def RemoveArchives(archives): | 267 def RemoveArchives(archives): |
| 268 """Remove the list of archives in Google storage. | 268 """Remove the list of archives in Google storage. |
| 269 """ | 269 """ |
| 270 for archive in archives: | 270 for archive in archives: |
| 271 if archive.find(GS_SITE) == 0: | 271 if archive.find(GS_SITE) == 0: |
| 272 cmd = [GSUTIL, 'rm', archive.rstrip()] | 272 cmd = [GSUTIL, 'rm', archive.rstrip()] |
| 273 (status, _) = ExecuteCommand(cmd) | 273 (status, _) = ExecuteCommand(cmd) |
| 274 if status != 0: | 274 if status != 0: |
| 275 return status | 275 return status |
| 276 return 0 | 276 return 0 |
| OLD | NEW |