~jugmac00/lpci:use-pluggy-for-plugins

Last commit made on 2021-12-16
Get this branch:
git clone -b use-pluggy-for-plugins https://git.launchpad.net/~jugmac00/lpci
Only Jürgen Gmach can upload to this branch. If you are Jürgen Gmach please log in for upload directions.

Branch merges

Branch information

Name:
use-pluggy-for-plugins
Repository:
lp:~jugmac00/lpci

Recent commits

dfd240b... by Jürgen Gmach

Introduce pluggy to manage plugins

pluggy ( https://pluggy.readthedocs.io/en/stable/ ) let's you define
hooks which then plugins can implement.

Example:
Using the new hook `lpcraft_install_packages` one can add additional
system packages to be installed with `apt`.

Please refer to the documentation on how to create your own plugin.

0e98f96... by Colin Watson

Note that run-one is subject to change

83c29b8... by Colin Watson

Simplify assertion

8825d44... by Colin Watson

Add a "run-one" command

We need a way to run only a single job from a pipeline, both because we
want an easy way to record log output for separate jobs separately, and
because we want to be able to retry individual jobs.

Matrix expansion makes this somewhat complicated, because as a result
there can be multiple expanded job definitions with the same name that
differ only in (for example) series or environment. The simplest
approach I can think of turns out to be to just take an index as well as
the job name; this is safe since matrix expansion has a stable order,
and in Launchpad the dispatcher end is going to need to do its own
matrix expansion anyway.

I went for a separate "run-one" command rather than options to "run"
since the command-line syntax is sufficiently different that it makes
sense to validate it separately.

6bfe899... by Colin Watson

Document job/series/architecture name constraints

6231327... by Colin Watson

Add "Configuration file syntax" documentation

This is taken directly from the extensible builds specification.

44a8cf8... by Colin Watson

Constrain job, series, and architecture names

To avoid confusion elsewhere (for example with using these names on
command lines), it seems like a good idea to constrain job, series, and
architecture names to use a limited syntax that makes sense for unique
identifiers. I based this on the syntax permitted for names in
Launchpad, although it isn't quite identical since I think people are
likely to want to use underscores here and there's no good reason to
forbid that.

910abfb... by Jürgen Gmach

Fix compatibility issue with Read the Docs

rtd builds documentation by default on Python3.7, but craft-providers,
which is a dependency of lpcraft, requires Python 3.8 or higher.

e42729b... by Jürgen Gmach

Start sphinx documentation

2df72a0... by Jürgen Gmach

Enable easier testing for argparse applications

argparse usually looks into sys.args to get the arguments.

But you can also pass in the arguments as a list - that way there is no
more need to patch sys.args for testing purposes.