From 4919014ad5a2bd7d3a530c2b474fa345a4ea9ebb Mon Sep 17 00:00:00 2001 From: Michel Normand Date: Nov 13 2017 08:39:24 +0000 Subject: New images.json.sample file to be copied/modified (without comment lines) as /etc/fedora-openqa/images.json or ~/.config/fedora-openqa/images.json if want to change from default WANTED dict in fedora_openqa/config.py Better to tune this images.json at installation time to manage list of supported arches. This is a follow up of previous commits: * 4d1b71a Add ppc64/ppc64le images support * 9f19b1f Don't schedule PowerPC jobs by default, for now Signed-off-by: Michel Normand --- diff --git a/README.md b/README.md index bb10df1..befd262 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ If you wish to forward results to [Wikitcms](https://fedoraproject.org/wiki/Wiki This tool has its own configuration file which can be installed to `/etc/fedora-openqa/schedule.conf` or `~/.config/fedora-openqa/schedule.conf`. In this config file you can specify the locations of the wiki and ResultsDB instance that will be used when reporting results with `fedora-openqa report`; by default, results will be reported to the [staging wiki](https://stg.fedoraproject.org/wiki/) and to a ResultsDB instance running on localhost port 5001 (which is what you get if you follow the instructions to do a local deployment of ResultsDB for testing). You can also specify the openQA, wiki and ResultsDB URLs / hostnames which will be used by the various fedmsg consumers. A sample config file is provided as `schedule.conf.sample`, which you can copy into place and modify. -You can configure the set of images from each compose which will be downloaded and tested. For more details on this, see the comments in `fedora_openqa/config.py`. +You can configure the set of images from each compose which will be downloaded and tested. For more details on this, see the comments in `images.json.sample`. To run openQA jobs whenever a compose completes, you must install and enable fedmsg-hub. On Fedora: diff --git a/fedora_openqa/config.py b/fedora_openqa/config.py index 2950782..1b1fb0e 100644 --- a/fedora_openqa/config.py +++ b/fedora_openqa/config.py @@ -77,28 +77,7 @@ CONFIG.read('{0}/.config/fedora-openqa/schedule.conf'.format(os.path.expanduser( # The default set of tested images. This set can be overridden by an # 'images.json' file in /etc/fedora-openqa or ~/.config/fedora-openqa. - -# The format is a list of dicts. Each dict represents a single image -# we want to test. The list is compared against the list of image -# dicts fedfind returns for the release being tested. One of the items -# in the image dict is itself a dict called 'match'. This dict -# determines whether the image "matches": if all the items in this -# "match" dict match the items in the fedfind image dict, we take that -# image. - -# The other items in the image dict here are not used for matching, -# but instead influence the behaviour of the scheduler. - -# The "score" item is used to decide which images to run the universal -# tests with. For each arch that has universal tests, the found image -# with the highest score is used. If no image with a score > 0 is -# found, the universal tests are skipped. If score is not specified -# the image is considered to have a score of 0. - -# If "dkboot" is set to True, scheduler also downloads kernel and initrd -# files for specified architecture and then schedules job to run in Direct -# Kernel Boot mode. Default value (used when dkboot item is not specified) -# is False. +# Refer to comments in ../images.json.sample WANTED = [ { diff --git a/images.json.sample b/images.json.sample new file mode 100644 index 0000000..bc1ed7e --- /dev/null +++ b/images.json.sample @@ -0,0 +1,160 @@ +// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +// all comment lines to be stripped when copied as images.json +// because not supported by json parser. +// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +// +// fedora-openqa-schedule (both CLI and module) will read configuration from +// /etc/fedora-openqa/images.json or ~/.config/fedora-openqa/images.json +// if they exist (with the latter taking priority if both exist). +// +// The format is a list of dicts. Each dict represents a single image +// we want to test. The list is compared against the list of image +// dicts fedfind returns for the release being tested. One of the items +// in the image dict is itself a dict called 'match'. This dict +// determines whether the image "matches": if all the items in this +// "match" dict match the items in the fedfind image dict, we take that +// image. +// +// The other items in the image dict here are not used for matching, +// but instead influence the behaviour of the scheduler. +// +// The "score" item is used to decide which images to run the universal +// tests with. For each arch that has universal tests, the found image +// with the highest score is used. If no image with a score > 0 is +// found, the universal tests are skipped. If score is not specified +// the image is considered to have a score of 0. +// +// If "dkboot" is set to true, scheduler also downloads kernel and initrd +// files for specified architecture and then schedules job to run in Direct +// Kernel Boot mode. Default value (used when dkboot item is not specified) +// is false. + +[ + { + "match": { + "subvariant": "Server", + "type": "boot", + "format": "iso", + "arch": "x86_64" + }, + "score": 6 + }, + { + "match": { + "subvariant": "Server", + "type": "dvd", + "format": "iso", + "arch": "x86_64" + }, + "score": 10 + }, + { + "match": { + "subvariant": "Server", + "type": "boot", + "format": "iso", + "arch": "i386" + }, + "score": 6 + }, + { + "match": { + "subvariant": "Server", + "type": "dvd", + "format": "iso", + "arch": "i386" + }, + "score": 10 + }, + { + "match": { + "subvariant": "Everything", + "type": "boot", + "format": "iso", + "arch": "x86_64" + }, + "score": 8 + }, + { + "match": { + "subvariant": "Everything", + "type": "boot", + "format": "iso", + "arch": "i386" + }, + "score": 8 + }, + { + "match": { + "subvariant": "Workstation", + "type": "live", + "format": "iso", + "arch": "x86_64" + } + }, + { + "match": { + "subvariant": "Workstation", + "type": "boot", + "format": "iso", + "arch": "x86_64" + } + }, + { + "match": { + "subvariant": "Workstation", + "type": "live", + "format": "iso", + "arch": "i386" + } + }, + { + "match": { + "subvariant": "Workstation", + "type": "boot", + "format": "iso", + "arch": "i386" + } + }, + { + "match": { + "subvariant": "KDE", + "type": "live", + "format": "iso", + "arch": "x86_64" + } + }, + { + "match": { + "subvariant": "KDE", + "type": "live", + "format": "iso", + "arch": "i386" + } + }, + { + "match": { + "subvariant": "Minimal", + "type": "raw-xz", + "format": "raw.xz", + "arch": "armhfp" + }, + "dkboot": true + }, + { + "match": { + "subvariant": "Atomic", + "type": "dvd-ostree", + "format": "iso", + "arch": "x86_64" + } + }, + { + "match": { + "subvariant": "Workstation Ostree", + "type": "dvd-ostree", + "format": "iso", + "arch": "x86_64" + } + } +]