crosvm/infra/recipes/update_chromeos_merges.py
Dennis Kempin 5156976b7f merge_bot: Enable on luci
To enable the merge bot on luci we had to solve a couple of problems:

- We cannot use http cookies for auth, so added gcloud auth into
  merge_bot.
- Switch back to original HEAD after running merge bot. Otherwise
  the version of the merge_bot script can change between invocations.
- Do not soft reset when checking out crosvm source.
- For less invasive testing, also added a few more exceptions when
  using MERGE_BOT_TEST so it won't email, etc.
- Rename to update_chromeos_merges, as it is more fitting to what
  the bot is doing

BUG=b:233913643
TEST=https://ci.chromium.org/swarming/task/5b58ed4497fda510

Change-Id: Iaa9b4821b70a1e90d19637d01856196bd7852ed5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3692686
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-08 17:20:27 +00:00

43 lines
1 KiB
Python

# Copyright 2022 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine.post_process import Filter
PYTHON_VERSION_COMPATIBILITY = "PY3"
DEPS = [
"crosvm",
"recipe_engine/context",
"recipe_engine/step",
]
def RunSteps(api):
with api.crosvm.build_context(container=False):
api.step(
"Update Merges",
[
"vpython3",
"./tools/chromeos/merge_bot",
"--verbose",
"update-merges",
"--is-bot",
"origin/main",
],
)
api.step(
"Update Dry Runs",
[
"vpython3",
"./tools/chromeos/merge_bot",
"--verbose",
"update-dry-runs",
"--is-bot",
"origin/main",
],
)
def GenTests(api):
yield (api.test("basic") + api.post_process(Filter().include_re(r"Update .*")))