Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: bin/cbuildbot.py

Issue 6027006: Move git config till after we sync. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: whitespace Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS 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 """CBuildbot is wrapper around the build process used by the pre-flight queue""" 7 """CBuildbot is wrapper around the build process used by the pre-flight queue"""
8 8
9 import errno 9 import errno
10 import heapq 10 import heapq
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 """Uses repo to checkout the source code. 67 """Uses repo to checkout the source code.
68 68
69 Keyword arguments: 69 Keyword arguments:
70 retries -- Number of retries to try before failing on the sync. 70 retries -- Number of retries to try before failing on the sync.
71 """ 71 """
72 while retries > 0: 72 while retries > 0:
73 try: 73 try:
74 # The --trace option ensures that repo shows the output from git. This 74 # The --trace option ensures that repo shows the output from git. This
75 # is needed so that the buildbot can kill us if git is not making 75 # is needed so that the buildbot can kill us if git is not making
76 # progress. 76 # progress.
77 RunCommand(['repo', '--trace', 'sync'], cwd=buildroot)
77 RunCommand(['repo', 'forall', '-c', 'git', 'config', 78 RunCommand(['repo', 'forall', '-c', 'git', 'config',
78 'url.ssh://git@gitrw.chromium.org:9222.insteadof', 79 'url.ssh://git@gitrw.chromium.org:9222.insteadof',
79 'http://git.chromium.org/git'], cwd=buildroot) 80 'http://git.chromium.org/git'], cwd=buildroot)
80 RunCommand(['repo', '--trace', 'sync'], cwd=buildroot)
81 retries = 0 81 retries = 0
82 except: 82 except:
83 retries -= 1 83 retries -= 1
84 if retries > 0: 84 if retries > 0:
85 Warning('CBUILDBOT -- Repo Sync Failed, retrying') 85 Warning('CBUILDBOT -- Repo Sync Failed, retrying')
86 else: 86 else:
87 Warning('CBUILDBOT -- Retries exhausted') 87 Warning('CBUILDBOT -- Retries exhausted')
88 raise 88 raise
89 89
90 RunCommand(['repo', 'manifest', '-r', '-o', '/dev/stderr'], cwd=buildroot) 90 RunCommand(['repo', 'manifest', '-r', '-o', '/dev/stderr'], cwd=buildroot)
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 except: 731 except:
732 # Send failure to master bot. 732 # Send failure to master bot.
733 if not buildconfig['master'] and buildconfig['important']: 733 if not buildconfig['master'] and buildconfig['important']:
734 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) 734 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED)
735 735
736 raise 736 raise
737 737
738 738
739 if __name__ == '__main__': 739 if __name__ == '__main__':
740 main() 740 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698