OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Runs all the buildbot steps for ChromeDriver except for update/compile.""" | 6 """Runs all the buildbot steps for ChromeDriver except for update/compile.""" |
7 | 7 |
8 import bisect | 8 import bisect |
9 import csv | 9 import csv |
10 import datetime | 10 import datetime |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 def _ArchiveGoodBuild(platform, revision): | 188 def _ArchiveGoodBuild(platform, revision): |
189 assert platform != 'android' | 189 assert platform != 'android' |
190 util.MarkBuildStepStart('archive build') | 190 util.MarkBuildStepStart('archive build') |
191 | 191 |
192 server_name = 'chromedriver' | 192 server_name = 'chromedriver' |
193 if util.IsWindows(): | 193 if util.IsWindows(): |
194 server_name += '.exe' | 194 server_name += '.exe' |
195 zip_path = util.Zip(os.path.join(chrome_paths.GetBuildDir([server_name]), | 195 zip_path = util.Zip(os.path.join(chrome_paths.GetBuildDir([server_name]), |
196 server_name)) | 196 server_name)) |
197 | 197 |
198 build_url = '%s/chromedriver_%s_%s.%s.zip' % ( | 198 build_name = 'chromedriver_%s_%s.%s.zip' % ( |
199 GS_CONTINUOUS_URL, platform, _GetVersion(), revision) | 199 platform, _GetVersion(), revision) |
| 200 build_url = '%s/%s' % (GS_CONTINUOUS_URL, build_name) |
200 if slave_utils.GSUtilCopy(zip_path, build_url): | 201 if slave_utils.GSUtilCopy(zip_path, build_url): |
201 util.MarkBuildStepError() | 202 util.MarkBuildStepError() |
202 | 203 |
| 204 (latest_fd, latest_file) = tempfile.mkstemp() |
| 205 os.write(latest_fd, build_name) |
| 206 os.close(latest_fd) |
| 207 latest_url = '%s/latest_%s' % (GS_CONTINUOUS_URL, platform) |
| 208 if slave_utils.GSUtilCopy(latest_file, latest_url, mimetype='text/plain'): |
| 209 util.MarkBuildStepError() |
| 210 os.remove(latest_file) |
| 211 |
203 | 212 |
204 def _MaybeRelease(platform): | 213 def _MaybeRelease(platform): |
205 """Releases a release candidate if conditions are right.""" | 214 """Releases a release candidate if conditions are right.""" |
206 assert platform != 'android' | 215 assert platform != 'android' |
207 | 216 |
208 # Check if the current version has already been released. | 217 # Check if the current version has already been released. |
209 result, _ = slave_utils.GSUtilListBucket( | 218 result, _ = slave_utils.GSUtilListBucket( |
210 '%s/%s/chromedriver_%s*' % ( | 219 '%s/%s/chromedriver_%s*' % ( |
211 GS_CHROMEDRIVER_BUCKET, _GetVersion(), platform), | 220 GS_CHROMEDRIVER_BUCKET, _GetVersion(), platform), |
212 []) | 221 []) |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 if options.update_log: | 392 if options.update_log: |
384 util.MarkBuildStepStart('update test result log') | 393 util.MarkBuildStepStart('update test result log') |
385 _UpdateTestResultsLog(platform, options.revision, passed) | 394 _UpdateTestResultsLog(platform, options.revision, passed) |
386 elif passed: | 395 elif passed: |
387 _ArchiveGoodBuild(platform, options.revision) | 396 _ArchiveGoodBuild(platform, options.revision) |
388 _MaybeRelease(platform) | 397 _MaybeRelease(platform) |
389 | 398 |
390 | 399 |
391 if __name__ == '__main__': | 400 if __name__ == '__main__': |
392 main() | 401 main() |
OLD | NEW |