Add push-to-github kokoro config and script

This is hard to test. I verified that kokoro can access
the github token and use it to access github by adding
a git clone into the x86 presubmit build file in patchset 3.

But we can only really test the full process by submitting this
CL and have it pass through the continuous builder.

BUG=b:199692764
TEST=Needs to be tested in prod...

Change-Id: Ifdcd385552c61ecea75a43fb71b08950e8b036ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3229941
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
Dennis Kempin 2021-10-18 11:21:14 -07:00
parent 1b284f8dcd
commit 49c169a410
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,9 @@
#!/bin/bash
# Copyright 2021 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.
GITHUB_TOKEN_FILE=$KOKORO_KEYSTORE_DIR/76320_github_token
TOKEN=$(cat $GITHUB_TOKEN_FILE)
git push --mirror "https://crosvm-bot:${TOKEN}@github.com/google/crosvm.git"

View file

@ -0,0 +1,13 @@
# Format: //devtools/kokoro/config/proto/build.proto
build_file: "crosvm/ci/kokoro/build-push-to-github.sh"
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 76320
keyname: "github_token"
backend: "blade:keystore-fastconfigpush"
}
}
}