Commit graph

2,879 commits

Author SHA1 Message Date
8f4d342c50
phase/imagebuilder: vhd-compressed mapping
All checks were successful
Tests / test (pull_request) Successful in 2m2s
Tests / test (push) Successful in 1m49s
Add the `vhd-compressed` format to the mapping of image types so pungi
puts the images into the compose. See also [1], [2].

[1]: https://pagure.io/pungi/c/8fb694f000848a90b51ec17294375fd13e07733b?branch=master
[2]: https://pagure.io/releng/failed-composes/issue/6047#comment-899622

Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
2026-07-31 07:21:33 +02:00
f313d76812 Update documentation links
All checks were successful
Tests / test (push) Successful in 2m8s
Tests / test (pull_request) Successful in 2m11s
Link to forgejo where applicable, drop mentions of IRC.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2026-07-23 11:29:32 +02:00
83fdda8277 Switch to Forgejo Actions as CI
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2026-07-23 11:29:32 +02:00
540662149f doc: add favicon to the docs site
Signed-off-by: guillermodotn <guillermodotn@redhat.com>
2026-07-07 14:47:58 +02:00
d0088a8fc8 doc: update pahses SVG to new scipt generated one
Signed-off-by: guillermodotn <guillermodotn@redhat.com>
2026-07-07 12:37:02 +02:00
b42f29a162 doc: YAML driven phase diagram generator replacing hand-mantained SVG
Signed-off-by: guillermodotn <guillermodotn@redhat.com>
2026-07-07 12:35:15 +02:00
fefe8704bf Release 4.13.0 pungi-4.13.0
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2026-05-06 08:33:58 +02:00
817d24ad62
phase/kiwi, phase/image-builder: xorrisofs
The createiso and buildinstall phases use this flag to switch which
backend is used. I've added this to the other stages that produce ISOs
thought we might want to discuss the naming?

Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
2026-04-29 10:46:23 +02:00
ad1c3ed7e3
phase/kiwi, phase/image-builder: iso fields
The image-builder and kiwi phases did not implement the ISO-specific
bits to store additional metadata (`implant_md5` and `volume_id`).

This commit adds those inspections and sets the appropriate fields on
the image object so these values show up in `images.json`.

Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
2026-04-29 10:46:23 +02:00
78a724467e imagebuilder,kiwibuild: fix failable wildcard arch expansion
When failable=['*'] is configured, the arch list was expanded using
image_conf['arches'], which raises a KeyError when 'arches' is not
explicitly set in the config. Use build_arches instead, which is already
computed as the intersection of configured and available arches and is
always present.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2026-04-22 06:33:55 +00:00
22bfc74ca6 Improve Koji task ID discovery and logging
The main improvement here is to write Koji task IDs, where
possible, into the JSON file which records required, attempted
and failed deliverables in the compose.

This actually writes a deliverables-v2.json in a new format
alongside a deliverables.json in the original format, in case
anyone was relying on that format. In the new format, if we are
able to know the Koji task ID associated with the deliverable,
we include it (otherwise it's None / null).

This requires a bit of new plumbing to allow phase workers to
log the task ID once they've found it, because we never have it
when we call `failable`, which is the usual entry point to this
logging. We add a new `record_deliverable_kojitask` method which
workers can use to log the Koji task ID in a dict keyed on the
"deliverable" and the "num", which *ought* to always be unique.

It also means we need to add `num` to the signature of `failable`
so we have it available at all the points we need it.

Then at the end of the compose process, when we do the logging
work with the dicts of required / failed / attempted deliverables,
we map the Koji task dict into the data before logging and
outputting it.

Along the way, we do some rationalizing of when we're using the
concept called "deliverable" in the phases instead of repeating
magic strings which are hard to distinguish from sometimes-but-
not-always-identical concepts like the "phase name".

We also improve Koji task ID discovery for some Runroot-based
phases. Runroot can run a command in Koji, ssh, or locally. The
`run` method previously always returned `None` (implicitly); we
change it to return a Koji task ID if whatever sub-runner it used
returned one, which will be the case if it was the Koji runner.

This allows phases that use Runroot to get a Koji task ID if
possible, record it for this mechanism, and also log it in their
DONE message.

Finally, we also log the Koji task ID in the [FAIL] message
logged in `util.log_failed_task` if possible.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-04-20 11:18:15 -07:00
c32ae235c0 phases/buildinstall: remove unused non-lorax paths
We dropped the "buildinstall" (as opposed to "lorax") method for
this phase in b513c8cd00 in 2023,
but these codepaths were left. They cannot be reached any more
because variant was only None when using the "buildinstall"
method, with the "lorax" method it is always set.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-04-17 11:09:32 -07:00
d4a2161ff5 Correct ostree_installer phase name in log messages
It calls itself "Ostree phase", but it's not.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-04-17 11:09:12 -07:00
9e125e2ae7
phase/imagebuilder: failable arches fix
The failable arches from the configuration were always overwritten with
an empty list.

In today's rawhide compose we noticed an image built with
`image-builder` that was set to `failable=['*']` actually doomed a
compose. Let's fix that.

Note that this is a partial fix; the case where a single arch is
failable is not handled here yet but we currently do not have any
configs anywhere that have a partially failable deliverable for
`image-builder`.

Since the latter case (partial failable) needs to pass the argument
along to the koji plugin I'll need to update the plugins schema first to
accept the argument, hence I'll do that in a follow-up.

Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
2026-04-16 17:39:21 +02:00
9311581bab Move image sanity checks from test phase to image-generating phases
Previously, the test phase performed sanity checks on all images after
the entire compose was created. This meant errors were detected late and
in a context removed from the phase that created the problematic image.

This commit moves image sanity checks directly into the phases that
generate images, providing immediate feedback when an image is created.

Image format and bootability validation:
- createiso: validates DVD/ISO images after creation
- extra_isos: validates extra/unified ISO images
- buildinstall: validates boot.iso
- livemedia: validates live media ISOs
- ostree_installer: validates OSTree installer ISOs
- kiwibuild/imagebuilder/osbuild: validates bootable ISOs

The test phase now only validates image metadata serialization.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2026-04-14 13:47:13 +02:00
6795e8ea56 Update phase diagram
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2026-04-14 13:44:30 +02:00
65278043ed Remove OSBS and ImageContainer phases
We're pretty sure these are now obsolete. Fedora definitely does
not use them and I cannot find any indication that any currently-
active CentOS or RHEL compose uses them.

We also update tests and docs, remove some things in compose that
were only used by these phases, and - since we're touching
phases.rst anyway - clean up stray mention of another phase that
was removed a while back (LiveImages).

Merges: https://pagure.io/pungi/pull-request/1904
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-04-14 13:44:19 +02:00
ee9d4a1426 Drop size check for ISOs
This code is not really used anymore as users either stop needing this
or implemented their own check that handles additional use cases.

Let's simplify the code base by removing unneeded parts. The old
configuration options are still accepted, but only report a deprecation
warning.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2026-04-14 12:20:54 +02:00
e294ed6299 Support list of URLs for rpm_repo_mapping
The `rpm_repo_mapping` config option previously only accepted a single
string URL. This change allows it to accept a list of URLs, expanding
each into separate numbered repo entries (rpm-repo-mapping-0,
rpm-repo-mapping-1, ...) when writing the pungi config.

Update the schema in checks.py to allow either a string or list of
strings for the repos values.

JIRA: RHELCMP-15220
Signed-off-by: Haibo Lin <hlin@redhat.com>
2026-04-07 15:42:52 +08:00
b08ba7d765 docs: modernize Sphinx conf.py
Replace the 2015 sphinx-quickstart boilerplate with a minimal modern
config. Switches html_theme from "default" to "alabaster" and removes
unused LaTeX, man page, and Texinfo output sections.

Signed-off-by: Haibo Lin <hlin@redhat.com>
2026-03-31 18:44:42 +08:00
3b24eb0194 kiwi: also include subvariant in failure logging
There's a little thicket of code around this `failable` context
manager which is AFAICT only used for logging (in util.py and
compose.py). We can get more useful log messages for Kiwi task
failures by including the subvariant here. These are important
because they're read by compose-tracker and included in the
failed-composes tickets. Currently we get something like this:

[KIWIBUILD       ] [ERROR   ] [FAIL] Kiwibuild (variant Container, arch *) failed, but going on anyway.

If this works as intended we should instead get:

[KIWIBUILD       ] [ERROR   ] [FAIL] Kiwibuild (variant Container, arch *, subvariant FEX_RootFS) failed, but going on anyway.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-03-30 18:32:06 -07:00
5695946cce kiwi: include image profile in global logs and watch-task filenames
Currently, we only include the variant in the global.log
"kiwibuild task" messages and the names of files in
logs/global/kiwibuild. That means we get rather unhelpful
logs, like this:

2026-03-30 05:57:58 [KIWIBUILD       ] [INFO    ] [BEGIN] kiwibuild task for variant Spins
2026-03-30 05:57:58 [KIWIBUILD       ] [INFO    ] [BEGIN] kiwibuild task for variant Spins
2026-03-30 05:57:58 [KIWIBUILD       ] [INFO    ] [BEGIN] kiwibuild task for variant Spins
2026-03-30 05:57:58 [KIWIBUILD       ] [INFO    ] [BEGIN] kiwibuild task for variant Spins
2026-03-30 05:57:58 [KIWIBUILD       ] [INFO    ] [BEGIN] kiwibuild task for variant Spins
2026-03-30 05:57:58 [KIWIBUILD       ] [INFO    ] [BEGIN] kiwibuild task for variant Spins
2026-03-30 05:57:58 [KIWIBUILD       ] [INFO    ] [BEGIN] kiwibuild task for variant Spins
...

and unhelpful filenames like this:

Labs-15-watch-task.log
Labs-16-watch-task.log
Labs-17-watch-task.log
Labs-18-watch-task.log
Labs-19-watch-task.log
Labs-20-watch-task.log

Including the profile in these should make them much more useful.
They should now look like:

[BEGIN] kiwibuild task for variant Spins profile Xfce-Live

and:

Spins-Xfce-Live-34-watch-task.log

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2026-03-30 18:31:59 -07:00
d003d085b7 Release 4.12.0 pungi-4.12.0
JIRA: RHELCMP-15202
Signed-off-by: Haibo Lin <hlin@redhat.com>
2026-03-27 10:44:28 +08:00
30710dc7f8 docs: Add RPM repo mapping phase
JIRA: ROK-1541
Signed-off-by: Haibo Lin <hlin@redhat.com>
2026-03-23 11:20:22 +08:00
3381c0b0c3 Generate RPM repo mapping
Added a new phase to generate compose/metadata/rpm-repo-mapping.yaml

JIRA: ROK-1541
Signed-off-by: Haibo Lin <hlin@redhat.com>
2026-03-16 17:04:59 +08:00
078b9a1d4b trigger-konflux-pipeline: store Snapshot metadata in konflux.json
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-03-11 15:49:51 +01:00
279e18f230 trigger-konflux-pipeline: keep variant in PascalCase
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-03-11 13:34:35 +01:00
94d755637f trigger-konflux-pipeline: flip work directory layout to <variant>/<config_name>
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-03-11 12:32:37 +01:00
71629c6481 doc: update trigger_konflux_pipeline documentation
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-03-11 11:07:04 +01:00
760d38087e trigger-konflux-pipeline: organize artifacts under config_name/variant subdirectories
Signed-off-by: guillermodotn <gleiro@redhat.com>
Assisted-by: Claude Opus
2026-03-10 13:52:10 +01:00
3cc87fe87d trigger-konflux-pipeline: rename pipelinerun_name_prefix to config_name
Signed-off-by: guillermodotn <gleiro@redhat.com>
Assisted-by: Claude Opus
2026-03-10 13:03:31 +01:00
1c20f85cba trigger-konflux-pipeline: add retry logic for PipelineRun monitoring with 30s polling
Signed-off-by: guillermodotn <gleiro@redhat.com>
Assisted-by: Claude Opus
2026-03-10 12:39:26 +01:00
4ef747c171 trigger-konflux-pipeline: fetch and store Konflux Snapshot on PipelineRun success
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-03-10 12:19:38 +01:00
fd277ea7b5 Update template rendering testing script
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-02-26 11:14:29 +01:00
3267fe557f Fix reporting name fields
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-02-26 11:06:09 +01:00
592c3f5045 trigger_konflux_pipeline: get pipelinerun name from oc create output
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-02-25 19:18:53 +01:00
7ec94bcb02 gather: Move code out of __init__.py
Code is moved to phase.py and utils.py(shared functions) to avoid circular imports.

JIRA: ROK-1541
Signed-off-by: Haibo Lin <hlin@redhat.com>
2026-02-13 14:02:03 +08:00
9f5fd21e28 trigger-konflux-pipeline phase: use oc create instead of oc apply
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-02-12 11:35:07 +01:00
4b88c670b6 pkgset: Allow scratch tasks to override real builds
If user explicitly wants to include a scratch build, we should allow
that even if the same NVR is already taken by a real build.

It is a rather unusual situation, as the scratch build could never be
rebuilt as a real build with the same NVR, but this gets us more
consistency with how extra builds are handled.

JIRA: RHELCMP-14814
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2026-02-09 16:47:14 +01:00
40f3fbd4b5 Structure to automate test rendering of templates under the trigger_konflux_pipeline phase
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-02-06 14:59:26 +01:00
a9edb8b658 New version_major, version_minor and release_version variables
available for trigger_konflux_pipeline phase rendering (Jira RHELCMP-15129)

Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-02-06 14:39:11 +01:00
6989c9ede0 Black 26.1.0 new format
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-02-05 17:27:21 +01:00
674bbc3ccd Warp lines under trigger_konflux_pipeline docs
Signed-off-by: guillermodotn <gleiro@redhat.com>
2026-02-05 17:27:21 +01:00
7d7ea59161 Bump version to 4.11.0 pungi-4.11.0
Signed-off-by: guillermodotn <gleiro@redhat.com>
2025-12-15 23:52:47 +01:00
f82897187e Drop parameterized dependency
There were 4 files using this library. Since we already require pytest
to run the tests, we can migrate the tests to use
pytest.mark.parametrize to achieve the same thing with one less library
being pulled in.

However, the pytest approach is not compatible with tests based on
`unittest.TestCase`. The relevant tests are thus rewritten to be purely
pytest based.

Assisted-By: claude-sonnet-4-5@20250929
Fixes: https://pagure.io/pungi/issue/1884
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2025-11-13 12:39:57 +01:00
xuyonghui
69b4460ce7 feat: Support custom --workdir for Lorax
Signed-off-by: xuyonghui <xuyonghui@kylinos.cn>
2025-11-10 08:16:05 +00:00
97fcefc0e0 Fix: No JSON serializable pathlib.Path at compose.conf
Signed-off-by: guillermodotn <gleiro@redhat.com>
2025-11-07 16:57:26 +01:00
xuyonghui
8c2f76d075 feat: Support custom --sharedir for Lorax
Signed-off-by: xuyonghui <xuyonghui@kylinos.cn>
2025-11-06 21:07:52 +08:00
xuyonghui
e92c59054e feat: Add --sharedir option for lroax to override /usr/share/lorax/
Signed-off-by: xuyonghui <xuyonghui@kylinos.cn>
2025-11-06 18:31:02 +08:00
5b8f33f8fb Fix: Quietly skip trigger_konflux_pipeline phase when no config is present.
Signed-off-by: guillermodotn <gleiro@redhat.com>
2025-11-04 10:21:36 +01:00