util/board_status: Fetch and rebase after failed push
Currently, when the remote master branch of the board-status repository changes between cloning and pushing, `git push origin` fails. This race condition happens quite often with REACTS testing commits at the same time on different systems. If that happens, just download the objects and refs from the board-status repository and rebase the local changes on it. Try that three times before exiting with an error message. Change-Id: I628ebce54895f44be6232b622d56acbcc421b847 Helped-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Helped-by: Patrick Georgi <pgeorgi@google.com> Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/10262 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
This commit is contained in:
parent
16c12c0a30
commit
54e6aa7216
|
@ -286,11 +286,19 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then
|
|||
echo "Uploading results"
|
||||
git add "${vendor}"
|
||||
git commit -a -m "${mainboard_dir}/${tagged_version}/${timestamp}"
|
||||
git push origin
|
||||
count=0
|
||||
until git push origin || test $count -eq 3; do
|
||||
git pull --rebase
|
||||
count=$((count + 1))
|
||||
done
|
||||
|
||||
# Results have been uploaded so it's pointless to keep the
|
||||
# temporary files around.
|
||||
rm -rf "${tmpdir}"
|
||||
if test $count -eq 3; then
|
||||
echo "Error uploading to board-status repo, aborting."
|
||||
exit $EXIT_FAILURE
|
||||
fi
|
||||
fi
|
||||
cd "$coreboot_dir"
|
||||
|
||||
|
|
Loading…
Reference in New Issue