yocto-autobuilder-helper/scripts/run-auh
Alexander Kanavin cfa62a586a scripts: add a pair of scripts to set up and run Auto Upgrade Helper
This allows automating its setup and execution on all autobuilder worker machines;
previously there was a static setup on a dedicated machine, which wasn't
great from maintenance perspective.

To use:

scripts/setup-auh target_dir
scripts/run-auh target_dir

(run-auh can be run several times in a directory that
was previously set up)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-17 16:57:25 +01:00

33 lines
698 B
Bash
Executable File

#!/bin/bash
# Run Auto Upgrade Helper in a directory set up by setup_auh.
#
# Called with $1 - the directory where the setup was created
if [ -z $1 ]; then
echo "Use: $0 auh_setup_dir"
exit 1
fi
full_dir=$(readlink -e $1)
auh_dir=$full_dir/auto-upgrade-helper
poky_dir=$full_dir/poky
build_dir=$full_dir/build
sstate_dir=$full_dir/build/sstate-cache
pushd $poky_dir
# Base the upgrades on poky master
git fetch origin
git checkout -B tmp-auh-upgrades origin/master
source $poky_dir/oe-init-build-env $build_dir
$auh_dir/upgradehelper.py -e all
# clean up to avoid the disk filling up
rm -rf $build_dir/tmp/
rm -rf $build_dir/workspace/sources/*
find $sstate_dir -atime +10 -delete
popd