mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00
scripts: rebase before pushing patch and CVE metrics
There's a chance that run-cvecheck and run-patchmetrics fail to push because the remote repository has changed. Try to resolve this by pulling and rebasing immediately before the push, and failing if we can't rebase. [ YOCTO #15529 ] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
0e304514dd
commit
60e2011f34
|
@ -90,6 +90,10 @@ if [ -e tmp/log/cve/cve-summary.json ]; then
|
||||||
git -C $METRICSDIR add cve-check/$BRANCH/$TIMESTAMP.json
|
git -C $METRICSDIR add cve-check/$BRANCH/$TIMESTAMP.json
|
||||||
git -C $METRICSDIR commit -asm "Autobuilder adding new CVE data for branch $BRANCH" || true
|
git -C $METRICSDIR commit -asm "Autobuilder adding new CVE data for branch $BRANCH" || true
|
||||||
if [ "$PUSH" = "1" ]; then
|
if [ "$PUSH" = "1" ]; then
|
||||||
|
if ! git -C $METRICSDIR pull --rebase; then
|
||||||
|
echo "Aborting push, metrics repo has updated and cannot rebase cleanly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
git -C $METRICSDIR push
|
git -C $METRICSDIR push
|
||||||
fi
|
fi
|
||||||
$OURDIR/cve-report.py tmp/log/cve/cve-summary.json > $RESULTSDIR/cve-status-$BRANCH.txt
|
$OURDIR/cve-report.py tmp/log/cve/cve-summary.json > $RESULTSDIR/cve-status-$BRANCH.txt
|
||||||
|
|
|
@ -105,6 +105,10 @@ set +x
|
||||||
git -C $METRICSDIR commit -asm "Autobuilder adding new patch stats" || true
|
git -C $METRICSDIR commit -asm "Autobuilder adding new patch stats" || true
|
||||||
|
|
||||||
if [ "$PUSH" = "1" ]; then
|
if [ "$PUSH" = "1" ]; then
|
||||||
|
if ! git -C $METRICSDIR pull --rebase; then
|
||||||
|
echo "Aborting push, metrics repo has updated and cannot rebase cleanly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
git -C $METRICSDIR push
|
git -C $METRICSDIR push
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user