https://github.com/osbuild/koji-image-builder
https://github.com/osbuild/koji-image-builder
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/osbuild/koji-image-builder
- Owner: osbuild
- License: apache-2.0
- Created: 2025-01-06T09:29:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-14T13:29:01.000Z (over 1 year ago)
- Last Synced: 2025-03-14T20:46:32.404Z (over 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# koji-image-builder
> [!WARNING]
> This is a work-in-progress repository. There is no CI, nor is there any guarantees. Work can be pushed directly to main. We hope to transition out of this soon.
This project provides [`image-builder`](https://github.com/osbuild/image-builder-cli) integration with [Koji](https://pagure.io/koji). `image-builder` is a tool that builds images (as the name says).
## koji configuration
To use `koji-image-builder` you need the following things in your `koji` instance:
1. Create the `image-builder-build` group which contains `image-builder` and `distribution-gpg-keys`.
2. Create `fXX-image-builder-build` tags, which contain the `image-builder-build` group and have `mock.new_chroot` set to `0`.
3. Create `fXX-image-builder` targets, which use the `fXX-image-builder-build` tags as their build tag and the `fXX` tag as their target.
4. Add the `image-builder-build` group to your build tag.
4. Create packages for the things you want to build in the target tag, for example `Fedora-Minimal`
After this you can enable the `image_builder` plugin in your hub, and builder configuration files.
# TODO
- patch koji to accept zst (docs/schema.sql, archivetypes table + migration?)
## Test
## Unit
The unittests mock out the majority of `koji`-provied classes and run quickly, you can run them with:
```console
$ pytest test/unit
# ...
```
## Integration
These tests set up a full containerized `koji` environment and does image builds in it. `sudo` is required for this. The tests take long, especially if the containers need to be built. The following does a quick smoke test by setting up the entire environment and doing a build from the command line.
```console
$ python3 run.py test
# ...
```
Leaving out the `test` argument lets you run a local koji environment to interact with.