Commit ac48a9bd authored by Sergiy Byelozyorov's avatar Sergiy Byelozyorov Committed by Commit Bot

[tools] Trigger dry run on upload for auto-roller CLs

R=machenbach@chromium.org

Bug: chromium:781855
Change-Id: I919bd1340fa075819777ed685dbce88a0008d245
Reviewed-on: https://chromium-review.googlesource.com/756837
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49197}
parent 40dee181
......@@ -159,6 +159,7 @@ class UploadCL(Step):
force=True,
bypass_hooks=True,
cq=self._options.use_commit_queue,
cq_dry_run=self._options.use_dry_run,
cwd=cwd)
print "CL uploaded."
else:
......@@ -195,9 +196,13 @@ class AutoRoll(ScriptsBase):
"specified."),
parser.add_argument("--roll", help="Deprecated.",
default=True, action="store_true")
parser.add_argument("--use-commit-queue",
help="Check the CQ bit on upload.",
default=True, action="store_true")
group = parser.add_mutually_exclusive_group()
group.add_argument("--use-commit-queue",
help="Trigger the CQ full run on upload.",
default=False, action="store_true")
group.add_argument("--use-dry-run",
help="Trigger the CQ dry run on upload.",
default=True, action="store_true")
def _ProcessOptions(self, options): # pragma: no cover
if not options.author or not options.reviewer:
......
......@@ -206,7 +206,8 @@ class GitRecipesMixin(object):
self.Git(MakeArgs(args), **kwargs)
def GitUpload(self, reviewer="", author="", force=False, cq=False,
bypass_hooks=False, cc="", private=False, **kwargs):
cq_dry_run=False, bypass_hooks=False, cc="", private=False,
**kwargs):
args = ["cl upload --send-mail"]
if author:
args += ["--email", Quoted(author)]
......@@ -216,6 +217,8 @@ class GitRecipesMixin(object):
args.append("-f")
if cq:
args.append("--use-commit-queue")
if cq_dry_run:
args.append("--cq-dry-run")
if bypass_hooks:
args.append("--bypass-hooks")
if cc:
......
......@@ -1119,7 +1119,8 @@ deps = {
self.ROLL_COMMIT_MSG),
"", cwd=chrome_dir),
Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f "
"--use-commit-queue --bypass-hooks --gerrit", "", cwd=chrome_dir),
"--cq-dry-run --bypass-hooks --gerrit", "",
cwd=chrome_dir),
Cmd("git checkout -f master", "", cwd=chrome_dir),
Cmd("git branch -D work-branch", "", cwd=chrome_dir),
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment