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

Side by Side Diff: tools/autoroller/roll_chromium_revision.py

Issue 1746993003: autoroller: Remove sending tryjobs (done via CQ). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months 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
« 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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """Script to roll chromium_revision in the WebRTC DEPS file.""" 10 """Script to roll chromium_revision in the WebRTC DEPS file."""
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 def _UploadCL(dry_run, rietveld_email=None): 351 def _UploadCL(dry_run, rietveld_email=None):
352 logging.info('Uploading CL...') 352 logging.info('Uploading CL...')
353 if not dry_run: 353 if not dry_run:
354 cmd = ['git', 'cl', 'upload', '-f'] 354 cmd = ['git', 'cl', 'upload', '-f']
355 if rietveld_email: 355 if rietveld_email:
356 cmd.append('--email=%s' % rietveld_email) 356 cmd.append('--email=%s' % rietveld_email)
357 _RunCommand(cmd, extra_env={'EDITOR': 'true'}) 357 _RunCommand(cmd, extra_env={'EDITOR': 'true'})
358 358
359 359
360 def _LaunchTrybots(dry_run, skip_try):
361 logging.info('Sending tryjobs...')
362 if not dry_run and not skip_try:
363 _RunCommand(['git', 'cl', 'try'])
364
365
366 def _SendToCQ(dry_run, skip_cq): 360 def _SendToCQ(dry_run, skip_cq):
367 logging.info('Sending the CL to the CQ...') 361 logging.info('Sending the CL to the CQ...')
368 if not dry_run and not skip_cq: 362 if not dry_run and not skip_cq:
369 _RunCommand(['git', 'cl', 'set_commit']) 363 _RunCommand(['git', 'cl', 'set_commit'])
370 logging.info('Sent the CL to the CQ.') 364 logging.info('Sent the CL to the CQ.')
371 365
372 366
373 def main(): 367 def main():
374 p = argparse.ArgumentParser() 368 p = argparse.ArgumentParser()
375 p.add_argument('--clean', action='store_true', default=False, 369 p.add_argument('--clean', action='store_true', default=False,
376 help='Removes any previous local roll branch.') 370 help='Removes any previous local roll branch.')
377 p.add_argument('-r', '--revision', 371 p.add_argument('-r', '--revision',
378 help=('Chromium Git revision to roll to. Defaults to the ' 372 help=('Chromium Git revision to roll to. Defaults to the '
379 'Chromium HEAD revision if omitted.')) 373 'Chromium HEAD revision if omitted.'))
380 p.add_argument('-u', '--rietveld-email', 374 p.add_argument('-u', '--rietveld-email',
381 help=('E-mail address to use for creating the CL at Rietveld' 375 help=('E-mail address to use for creating the CL at Rietveld'
382 'If omitted a previously cached one will be used or an ' 376 'If omitted a previously cached one will be used or an '
383 'error will be thrown during upload.')) 377 'error will be thrown during upload.'))
384 p.add_argument('--dry-run', action='store_true', default=False, 378 p.add_argument('--dry-run', action='store_true', default=False,
385 help=('Calculate changes and modify DEPS, but don\'t create ' 379 help=('Calculate changes and modify DEPS, but don\'t create '
386 'any local branch, commit, upload CL or send any ' 380 'any local branch, commit, upload CL or send any '
387 'tryjobs.')) 381 'tryjobs.'))
388 p.add_argument('--allow-reverse', action='store_true', default=False, 382 p.add_argument('--allow-reverse', action='store_true', default=False,
389 help=('Allow rolling back in time (disabled by default but ' 383 help=('Allow rolling back in time (disabled by default but '
390 'may be useful to be able do to manually).')) 384 'may be useful to be able do to manually).'))
391 p.add_argument('-s', '--skip-try', action='store_true', default=False,
392 help='Skip sending tryjobs (default: %(default)s)')
393 p.add_argument('--skip-cq', action='store_true', default=False, 385 p.add_argument('--skip-cq', action='store_true', default=False,
394 help='Skip sending the CL to the CQ (default: %(default)s)') 386 help='Skip sending the CL to the CQ (default: %(default)s)')
395 p.add_argument('-v', '--verbose', action='store_true', default=False, 387 p.add_argument('-v', '--verbose', action='store_true', default=False,
396 help='Be extra verbose in printing of log messages.') 388 help='Be extra verbose in printing of log messages.')
397 opts = p.parse_args() 389 opts = p.parse_args()
398 390
399 if opts.verbose: 391 if opts.verbose:
400 logging.basicConfig(level=logging.DEBUG) 392 logging.basicConfig(level=logging.DEBUG)
401 else: 393 else:
402 logging.basicConfig(level=logging.INFO) 394 logging.basicConfig(level=logging.INFO)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 '%s (#%s). To roll to older revisions, you must pass the ' 431 '%s (#%s). To roll to older revisions, you must pass the '
440 '--allow-reverse flag.\n' 432 '--allow-reverse flag.\n'
441 'Aborting without action.', current_cr_rev, current_commit_pos, 433 'Aborting without action.', current_cr_rev, current_commit_pos,
442 new_cr_rev, new_commit_pos) 434 new_cr_rev, new_commit_pos)
443 return 0 435 return 0
444 436
445 _CreateRollBranch(opts.dry_run) 437 _CreateRollBranch(opts.dry_run)
446 UpdateDeps(deps_filename, current_cr_rev, new_cr_rev) 438 UpdateDeps(deps_filename, current_cr_rev, new_cr_rev)
447 _LocalCommit(commit_msg, opts.dry_run) 439 _LocalCommit(commit_msg, opts.dry_run)
448 _UploadCL(opts.dry_run, opts.rietveld_email) 440 _UploadCL(opts.dry_run, opts.rietveld_email)
449 _LaunchTrybots(opts.dry_run, opts.skip_try)
450 _SendToCQ(opts.dry_run, opts.skip_cq) 441 _SendToCQ(opts.dry_run, opts.skip_cq)
451 return 0 442 return 0
452 443
453 444
454 if __name__ == '__main__': 445 if __name__ == '__main__':
455 sys.exit(main()) 446 sys.exit(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