mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00
41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
PARENTDIR=`realpath $1`
|
|
TARGETDIR=`realpath $2`
|
|
RESULTSDIR=`realpath -m $3`
|
|
BUILDDIR=`realpath $4`
|
|
OURDIR=`dirname $0`
|
|
|
|
TIMESTAMP=`date +"%s"`
|
|
|
|
#
|
|
# Patch Metrics
|
|
#
|
|
git clone ssh://git@push.yoctoproject.org/yocto-metrics $PARENTDIR/yocto-metrics
|
|
$PARENTDIR/scripts/contrib/patchreview.py $TARGETDIR -j $PARENTDIR/yocto-metrics/patch-status.json
|
|
git -C $PARENTDIR/yocto-metrics commit -asm "Autobuilder adding new patch stats"
|
|
git -C $PARENTDIR/yocto-metrics push
|
|
|
|
if [ ! -d $RESULTSDIR ]; then
|
|
mkdir $RESULTSDIR
|
|
fi
|
|
|
|
cp $PARENTDIR/yocto-metrics/patch-status.json $RESULTSDIR
|
|
cp $PARENTDIR/yocto-metrics/patch-status/* $RESULTSDIR
|
|
|
|
#
|
|
# CVE Checks
|
|
#
|
|
bitbake world --runall cve_check -R conf/distro/include/cve-extra-exclusions.inc
|
|
mkdir -p $PARENTDIR/yocto-metrics/cve-check/
|
|
cp tmp/log/cve/cve-summary.json $PARENTDIR/yocto-metrics/cve-check-$TIMESTAMP.json
|
|
git -C $PARENTDIR/yocto-metrics add cve-check-$TIMESTAMP.json
|
|
git -C $PARENTDIR/yocto-metrics commit -asm "Autobuilder adding new CVE data"
|
|
git -C $PARENTDIR/yocto-metrics push
|
|
|
|
$OURDIR/cve-report.py tmp/log/cve/cve-summary.json > $RESULTSDIR/cve-status.txt
|
|
|
|
|