Commit graph

20 commits

Author SHA1 Message Date
Christian Kellner
e3ce5f7c7b plugin/builder: silence some pylint warnings
The 'koji' parameter for the compose request is called that way to
follow the OpenAPI spec, so silence the "redefined-outer-name"
warning.

The handler function needs have the actual task arguments and thus
on purpose deviates from the argument list of the base class'
handler method. So silence that.
2020-09-11 23:18:04 +01:00
Christian Kellner
6f1d685d9b plugin/builder: move argparse into main
The argparse import is only needed when the plugin is used as a
stand alone composer koji API client, therefore only include it
in main().
2020-09-11 23:18:04 +01:00
Christian Kellner
f7794daa13 plugin/builder: fix indent in cmd line arguments 2020-09-11 23:18:04 +01:00
Christian Kellner
1715558c8f plugin/builder: add more documentation
Describe the plugin itself and how it can be used as a stand-alone
executable.
2020-09-11 23:18:04 +01:00
Christian Kellner
20831a99bb plugin/builder: fix BuildError msg to include name
Fix the error message string to be a proper f-string in the
OSBuildImage.arches_for_config method, so it actually includes
the name of the tag.
2020-09-11 23:18:04 +01:00
Christian Kellner
dda203419c plugin/osbuild: adapt for composer API changes
The task id can and must now be passed to composer via the `koji`
object in the `ComposeRequest`. Do that.
2020-09-09 14:12:25 +02:00
Christian Kellner
8fb1342631 Make image_type and distro required arguments
Distro, in composer terms "distribution", and "image_type" are
required for composer, so make that explicit everywhere in the
code.
2020-09-08 16:13:48 +02:00
Christian Kellner
c5db26596f plugin/builder: nicer errors on compose fail
When creating the compose requests fails, catch it and transform
it into a koji.GenericError, which will avoid showing the full
backtrace in the UI.
2020-09-07 20:35:32 +02:00
Christian Kellner
cb7e4d76c5 plugins/builder: change location of config file
Make the path reflect the name of the package / project.
2020-09-07 18:39:13 +02:00
Christian Kellner
ccf6d60dac plugin/osbuild: simple whitespace changes
No semantic change.
2020-09-07 18:29:22 +02:00
Christian Kellner
3ef4d5e566 plugin/osbuild: make release optional
If release was not in `opts`, use `session.getNextRelease` to
obtain the next release.
2020-09-07 18:23:28 +02:00
Christian Kellner
dbf2960792 plugins/osbuild: sync with composer's koji API
Send the NVR as part of the compose request. The result now also
contains the koji build id. The distro argument is taken from
the options.
2020-09-07 18:15:30 +02:00
Christian Kellner
d31cadd304 plugins/builder: make urls configurable
Can't really hardcode those.
2020-09-06 20:10:59 +02:00
Christian Kellner
f58ecb97ac plugin/builder: support repo overwrites
Allow the repository information to be overwritten by the user
via opts.
2020-09-05 19:28:17 +02:00
Christian Kellner
b9b3680809 plugin/builder: make use of repo information
Don't hard-code the repo info, but get if via the build tag.
2020-09-05 18:54:52 +02:00
Christian Kellner
7fa31ce349 plugins/builder: check for supported arches
Fetch the supported architectures via the target and detect if
any of the requested are not supported.
2020-09-05 18:21:21 +02:00
Christian Kellner
6cdc3e7177 plugin/builder: ability to use as executable
Turn the plugin into an executable.
2020-09-05 17:28:44 +02:00
Christian Kellner
025d3b1902 plugin/builder: create proper composer client
Make a proper client for the osbuild composer koji API and use it.
2020-09-05 17:27:55 +02:00
Christian Kellner
8f41087797 plugins/builder: proof-of-concept compose
Talk to composer and create a compose via a hand crafted compose
request.
2020-09-05 16:33:45 +02:00
Christian Kellner
aefe1218b5 initial import 2020-09-02 19:15:25 +02:00