mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 12:09:31 +00:00
ci/kokoro: improve error checking
Check whether or not the rebase succeeds and fix a check that the script is being run by kokoro. BUG=None TEST=tools/presubmit Change-Id: I59ae6604c3535238f40a7df20c43b9db9e357fe3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3546578 Reviewed-by: Dennis Kempin <denniskempin@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: David Stevens <stevensd@chromium.org>
This commit is contained in:
parent
3a29174a7b
commit
a7a04e6095
1 changed files with 4 additions and 1 deletions
|
@ -19,7 +19,7 @@ if [[ ! -z "${DEBUG_SSH_KEY}" ]]; then
|
|||
fi
|
||||
|
||||
setup_source() {
|
||||
if [ -z "${KOKORO_ARTIFACTS_DIR}/git" ]; then
|
||||
if [ ! -d "${KOKORO_ARTIFACTS_DIR}" ]; then
|
||||
echo "This script must be run in kokoro"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -49,6 +49,9 @@ setup_source() {
|
|||
# us from rebasing the changes.
|
||||
git checkout -f
|
||||
git rebase origin/main
|
||||
if [ $? -ne 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Fetching Submodules..."
|
||||
git submodule update --init
|
||||
|
|
Loading…
Reference in a new issue