This repository contains the scripts to generate the build recipes (Dockerfiles or kiwi build descriptions) to build the BCI development project in the Open Build Service.
You will need the following tools:
- Python 3.10 or later
- poetry 1.2.0 or later
- osc installed and configured to reach
OBS by default. If you want to target IBS
(build.suse.de) directly, then add the alias
ibs
for https://build.suse.de. python-dnf
installed via your system's package manager (if you want to touch the .Net images)
To get started, clone this repository and run :command:`poetry install` in its root directory.
The main entry point of this project is the :file:`src/bci_build/update.py` script. It will branch the package on IBS, check it out into a temporary directory, regenererate the build recipes from the templates and send a submitrequest back upstream.
For example, to update the nodejs containers, run:
poetry run ./src/bci_build/update.py --commit-msg "Update according to $reason" --images nodejs-12-sp4 nodejs-14-sp4 nodejs-16-sp4
Or to update all images for a service pack, run:
poetry run ./src/bci_build/update.py --commit-msg "Update according to $OtherReason" --service-pack 4
If you do not want to interact with OBS at all, then you can also use the :file:`src/bci_build/package.py` script to just write the files of a single package into a directory:
poetry run package postgres-12-sp4 ~/tmp/postgres/
You can use the dockerfile generator via a development container published as ghcr.io/suse/bci-dockerfile-generator:
podman run --rm ghcr.io/suse/bci-dockerfile-generator:latest ./src/bci_build/update.py --help
Some commands of the dockerfile-generator use :command:`osc` and require access to a valid :file:`~/.config/osc/oscrc`. You can expose your own to the container via a volume as follows:
podman run --rm -v ~/.config/osc/:/root/.config/osc/:Z ghcr.io/suse/bci-dockerfile-generator:latest ./src/bci_build/update.py $additional_args