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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 self.name = os.environ[BUILDER_NAME] | 60 self.name = os.environ[BUILDER_NAME] |
61 pattern = re.match(NEW_BUILDER_PATTERN, self.name) | 61 pattern = re.match(NEW_BUILDER_PATTERN, self.name) |
62 if pattern: | 62 if pattern: |
63 self.arch = pattern.group(2) | 63 self.arch = pattern.group(2) |
64 self.mode = 'Release' | 64 self.mode = 'Release' |
65 self.is_incremental = (pattern.group(3) == '-inc') | 65 self.is_incremental = (pattern.group(3) == '-inc') |
66 self.is_full = not self.is_incremental | 66 self.is_full = not self.is_incremental |
67 self.channel = pattern.group(4) | 67 self.channel = pattern.group(4) |
68 else: | 68 else: |
69 pattern = re.match(BUILDER_PATTERN, self.name) | 69 pattern = re.match(BUILDER_PATTERN, self.name) |
70 assert pattern: | 70 assert pattern |
71 self.arch = 'x64' if pattern.group(2) == 'lucid64' else 'ia32' | 71 self.arch = 'x64' if pattern.group(2) == 'lucid64' else 'ia32' |
72 self.mode = 'Debug' if pattern.group(3) == 'debug' else 'Release' | 72 self.mode = 'Debug' if pattern.group(3) == 'debug' else 'Release' |
73 self.is_incremental = '-inc' in self.name | 73 self.is_incremental = '-inc' in self.name |
74 self.is_full = pattern.group(3) == 'full' | 74 self.is_full = pattern.group(3) == 'full' |
75 self.channel = pattern.group(6) if pattern.group(6) else 'be' | 75 self.channel = pattern.group(6) if pattern.group(6) else 'be' |
76 | 76 |
77 | 77 |
78 def ArchiveAndUpload(info, archive_latest=False): | 78 def ArchiveAndUpload(info, archive_latest=False): |
79 print '@@@BUILD_STEP dartium_generate_archive@@@' | 79 print '@@@BUILD_STEP dartium_generate_archive@@@' |
80 cwd = os.getcwd() | 80 cwd = os.getcwd() |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 def RemoveArchives(archives): | 270 def RemoveArchives(archives): |
271 """Remove the list of archives in Google storage. | 271 """Remove the list of archives in Google storage. |
272 """ | 272 """ |
273 for archive in archives: | 273 for archive in archives: |
274 if archive.find(GS_SITE) == 0: | 274 if archive.find(GS_SITE) == 0: |
275 cmd = [GSUTIL, 'rm', archive.rstrip()] | 275 cmd = [GSUTIL, 'rm', archive.rstrip()] |
276 (status, _) = ExecuteCommand(cmd) | 276 (status, _) = ExecuteCommand(cmd) |
277 if status != 0: | 277 if status != 0: |
278 return status | 278 return status |
279 return 0 | 279 return 0 |
OLD | NEW |