Go to file
Ross Burton 2954d78759 Rewrite metrics-gathering scripts
Rewrite the scripts that gather the metrics to be more generic.

Extract the metrics repository cloning out so that we don't have to
repeatedly clone it.

Make the scripts parse their arguments using getopt and be more specific
about what they're passed.  In particular, this means that for the patch
review run we pass the _repository_ that we're scanning so we can do git
operations on it, and the base of the _layers_ (either a layer, or a
directory containing layers) so we know what to scan.

Be more clever when identifying what commits we need to analyse for
patch review: instead of iterating through a set randomly, we can keep
the revision list sorted and the checkout operations are a lot faster.

Remove the commit/file count metric addition as patchreview itself does
that now.

Add an explicit --push option so it's easy to test the scripts in
isolation without pushing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-31 15:01:57 +00:00
janitor ab-janitor: only rm trashdir files over 60s old 2023-06-15 14:36:11 +01:00
lava resume-lava-jobs: Add lava-job cleanup script 2018-08-30 16:21:51 +01:00
lava-templates lava-templates: Add Jinja2 LAVA job-template on BSP x86_64 2018-08-30 16:21:51 +01:00
scripts Rewrite metrics-gathering scripts 2023-10-31 15:01:57 +00:00
.gitignore gitignore: Ignore __pycache__ directories 2022-05-17 09:47:47 +01:00
config-intelqa-x86_64-lava.json config-intelqa-x86_64-lava.json: Add extension to config.json to support BSP 2018-08-30 16:21:51 +01:00
config.json Rewrite metrics-gathering scripts 2023-10-31 15:01:57 +00:00
LICENSE.GPL-2.0-only Add license file 2022-05-17 12:37:51 +01:00
local-example.json utils: Allow customisation using ABHELPER_JSON from the environment 2018-06-20 23:16:10 +01:00
README README: add git-config commands to setup the mailer 2019-12-16 23:41:13 +00:00
SECURITY.md SECURITY.md: Add file 2023-10-24 12:58:24 +01:00

This repo is designed to work in conjuction yocto-autobuilder. Whilst yocto-autobuilder is designed to cover all releases, this repo has a branch per release and contains the hooks that do the actual build configuration and execution.

pre-commit-hook.sh can be used to verify the JSON before committing, symlink this to .git/hooks/pre-commit (ln -s ../../scripts/pre-commit-hook.sh .git/hooks/pre-commit).

Its likely most users will end up having to customise this repository for their needs. The scripts themselves should be more generically reusable, the config.json, less so as it represents the Yocto Project Autobuilder test matrix.

There are two customisation options possible, one is through variable substitution, the other is through overlaying configuration files. The standard config.json tries to at least allow substitution of the paths. A local-example.json is included to show how you could override these from a separate config file, simply passing:

ABHELPER_JSON="config.json local-example.json"

into the environment of the autobuilder.

ABHELPER_JSON="config.json /some/location/local.json"

would also allow customisation.

Authors: Richard Purdie richard.purdie@linuxfoundation.org Joshua Lock joshua.g.lock@intel.com

Contributions:

Patches for this code should be sent to the yocto@lists.yoctoproject.org mailing list with [yocto-autobuilder-helper] in the subject. This can be configured automatically with the following commands:

git config --local --add format.subjectprefix 'PATCH yocto-autobuilder-helper' git config --local --add sendemail.to yocto@lists.yoctoproject.org