@@ -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 commit -asm "Autobuilder adding new CVE data for branch $BRANCH" || true
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
fi
$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
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
fi
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> --- scripts/run-cvecheck | 4 ++++ scripts/run-patchmetrics | 4 ++++ 2 files changed, 8 insertions(+)