Kokoro: Allow manual merge targets in merge-into-chromeos

This allows us to manually specify the merge target when triggering
the Kokoro job to do partial merges.

BUG=b:209034086
TEST=None

Change-Id: If68231b46981dec679445dde50e1fb5ff66e57c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3340211
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Dennis Kempin 2021-12-14 15:13:19 -08:00 committed by Commit Bot
parent c8970b7a76
commit e204dda759

View file

@ -64,10 +64,14 @@ main() {
git clean -f -d -x
git checkout -f
# Remember the HEAD that Kokoro checked out. This is usually origin/main
# but can also be manually specified when triggering the job.
local target=$(git rev-parse HEAD)
# Perform merge on a tracking branch.
git checkout -b chromeos origin/chromeos
git branch --set-upstream-to origin/chromeos chromeos
"${KOKORO_ARTIFACTS_DIR}/create_merge"
"${KOKORO_ARTIFACTS_DIR}/create_merge" "${target}"
upload_with_retries
}