Commit graph

11 commits

Author SHA1 Message Date
Lars Karlitski
d3a0b788a2 distro: set the repository checksum dynamically
Instead of having a static repository checksum, set it dynamically from
the metadata that osbuild-composer last saw. This is implemented in
dnf-json, which returns the checksums for each repository on every call.

This enables the use of repositories that change over time, such as
fedora-updates. Note that the osbuild pipeline will break when such a
repository changes. This is intentional: pipelines have to be
reproducible.
2019-12-10 20:38:22 +01:00
Lars Karlitski
75218ad2d9 distro/fedora30: don't include variables in repo URL
Replace those variables with their contents everywhere the repository
URLs are used is error-prone.
2019-12-10 20:38:22 +01:00
Tom Gundersen
0d091decb5 test: add provisional multi-arch support
Currently we still only build for x86_64, but now the test suite is
prepared for hooking up other architectures.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-12-10 02:47:35 +01:00
Tom Gundersen
cc04f92997 test/cases: rename json sections
Rename to fit more closely with their use before we add too many more
of these.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-12-10 02:47:35 +01:00
Lars Karlitski
7b54f5cfdc pipeline: support osbuild runners
osbuild has a concept of runners now: scripts that set up a build
environment. Update the osbuild submodule to latest master, change
`Pipeline` to to the new buildroot description format, and use the
`org.osbuild.fedora30` runner from the fedora30 distro.
2019-11-27 02:47:36 +01:00
Tom Gundersen
de93ddc757 distro/f30: rework customizations
This slightly changes the customizations logic. We now make sure
that each stage is appended exactly once.

customizations.go are now responsible only for the things that are
completely generic, and not per-ouput-type. helpers.go contain more
high-level helpers that combine customziations and per-output-type
defaults.

This does not change the behaviour, though some pipelines are slightly
reordered to make them consistent.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-11-26 22:00:04 +01:00
Tom Gundersen
d1d3768d9d image-info: include more properties
This gets us closer to returning all the properties we support as
customizations.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-11-26 13:48:09 +01:00
Martin Sehnoutka
4910cd18e3 change image size to fulfill Azure requirements
the hardcoded image size is now aligned to 1MB, because Azure requires
it: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic

once we make the size configurable, we should make sure the alignment
stays the same

fix test cases to reflect new image size
2019-11-25 17:06:32 +01:00
Tom Gundersen
eee08c41ac image-info: support images with empty partitions
Official RHEL EC2 images come with an empty partition, simply ignore
it rather than fail.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2019-11-24 17:43:00 +01:00
Lars Karlitski
b33ed9e5d2 blueprint: move pipeline generation into its own package
Introduce the `distro` package, which contains an interface for OS
implementations. Its main purpose is to convert a blueprint to a
distro-specific pipeline.

Also introduce the `distro/fedora30` package. It is the first
implementation of the distro interface. Most of its code has been copied
with minimal modifications from the blueprint package.

The `blueprint` package is now back to serving a single purpose:
representing a weldr blueprint. It does not depend on the `pipeline`
package anymore.

Change osbuild-composer and osbuild-pipeline to use the new API,
hard-coding "fedora-30". This looks a bit weird now, but is the same
behavior as before.

All test cases now also take an "distro" key in the "compose" object.
2019-11-07 17:13:20 +01:00
Lars Karlitski
e7ae3b4c47 test: move image-info tests to test/
These tests (will) test more than just image-info: they'll take a
blueprint, verify that `osbuild-pipeline` generates the correct
pipeline, run osbuild with that pipeline and verify that the resulting
image has the expected image-info output.

This change only includes the latter half (i.e., only moves the already
existing tests).

Also drop python's unittest. It was hard to control output (important
for quickly spotting failures and to make travis happy). This introduces
test/run, which runs all test cases in test/cases or the ones given on
the command line.

When a failure occurs, it prints a diff of the actual and the expected
image info.
2019-10-30 01:25:44 +01:00
Renamed from tools/test_image_info/pipelines/disk_empty_blueprint.json (Browse further)