Commit graph

7242 commits

Author SHA1 Message Date
schutzbot
86af7dcf04 Post release version bump
[skip ci]
2025-04-02 08:15:52 +00:00
Tomáš Hozza
ae9386fe3e go.mod: update osbuild/images to v0.128.0
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
f9a8ae8d0d test/cross-distro: test actual image build on RHEL and CentOS
Test actual image builds of older distros on RHEL and CentOS, to catch
issues such as https://issues.redhat.com/browse/RHEL-71397.

The test can be later extended to cover also Fedora, but this is out of
scope at this point, since the goal is to ensure that RHEL cross-distro
builds work, because these differ a lot.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
d00a658752 test/cross-distro: building c8s is no longer supported by any distro
c8s is EOL.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
b010a855f6 test/shared_lib.sh: make *print functions print to stderr
This will allow using them inside Bash function that return values,
without tainting the returned value.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
856bdd3c74 test/cross-distro: remove unnecessary condition for composer < v97
This test case is no longer being run with an osbuild-composer version
lower than v97, so there's no need to special case it.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
d90399c260 test/cross-distro: remove repo overrides and force restart composer
Completely remove the /etc/osbuild-composer/repositories directory used
for repo overrides, to ensure that only repos from the RPM are used.

Moreover, instead of trying to restart osbuild-composer, which is always
a tricky thing to do, let's just stop all services and call the Weldr
API. Since the service is socket-activated, this will start all the
necessary services.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
987da06136 deploy.sh: set network_backend to netavark in containers.conf
Add a workaround for the issue that podman falls back to the 'cni'
network backend when finding any container images in the local storage
when executed for the first time. Since we started embedding container
images in our CI runner images, this resulted in failures, because the
OS is missing some required CNI plugins. Until we somehow fix this in
osbuild, we explicitly set the network backend to 'netavark'.

This is relevant only for RHEL-9 / c9s, because Fedora since F40 and
el10 support only `netavark` backend.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
92f14ce8c7 Schutzfile: remove repo overrides for RHEL-9.5
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
869b59faf4 .gitlab-ci.yml: move to latest RHEL-9 GA release (9.5)
Move testing on the latest RHEL-9 GA testing to the latest GA minor
version, which is 9.5.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
be1a9910cc Schutzbot: update terraform ref
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-01 08:40:13 +02:00
Tomáš Hozza
930658d605 Test/api.sh/vsphere: configure cloud-init via VM's extraConfig
We used to provide the cloud-init user-data and meta-data to the VM as
key/value in the VM's extraConfig as guestinfo keys. This replaces bunch
of code that used to create an ISO, upload it to VSphere and attach it
to the VM.

We recently started to observe issues when uploading the ISO to our
testing VSphere instance in CI. This commit aims to circumvent this
issue by using a different and simpler way to provide the cloud-init
data to the VM.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-03-31 12:33:48 +02:00
Achilleas Koutsou
ad0cb80bed cloudapi/v2: minsize can be a string or integer
Define a reusable minsize property in the cloud API schema.
The minsize type is either a uint64 or a string with data units.

Internally, this creates a union (json.RawMessage) type called Minsize
and optional uses of the property are of type *Minsize.  We define an
internal decodeMinsize() function to convert *Minsize to uint64.  This
is similar to the decodeSize() function in the blueprint, but made
specifically to handle *Minsize.
2025-03-27 11:33:56 +01:00
Achilleas Koutsou
82ac185e7c cloudapi: Disk customization conversion
Convert from cloudapi Disk customizations to the blueprint types.
2025-03-27 11:33:56 +01:00
Achilleas Koutsou
fe19c87dd9 common: new utility function: DerefOrDefault()
This is sort of the opposite of ToPtr().  It dereferences a pointer to
its base value or returns the default value for the type if the pointer
is nil.
2025-03-27 11:33:56 +01:00
Achilleas Koutsou
1a65e573eb cloudapi: add new Disk customizations
Following up from #4535 which added support for advanced partitioning
customizations to the blueprint.
These are now added to the cloud api spec.
2025-03-27 11:33:56 +01:00
Achilleas Koutsou
330ce26715 blueprint: update Disk customization with new features
- Partition table type: https://github.com/osbuild/images/pull/1085
- Partition type IDs:   https://github.com/osbuild/images/pull/1115
2025-03-27 11:33:56 +01:00
Achilleas Koutsou
6a112877f1 go.mod: update osbuild/images to v0.124.0 2025-03-27 11:33:56 +01:00
Sanne Raymaekers
a27880c0c6 osbuild-composer.spec: assume no modules in check step
Removes an ineffectual GO111MODULE=off assignment in the build phase, as
we require go to run in module mode at that stage.

In the check phase we run without go modules, so the same stipulation as
on RHEL applies, where the vendor directory gets ignored in certain
cases. Also remove `-mod=vendor` from GOFLAGS on RHEL during the check
phase, as without go modules this is an ineffectual flag.
2025-03-26 11:13:14 +01:00
Sanne Raymaekers
7652af83d7 cloudapi/v2: adapt to new oapi-codegen
Fixed distribution list type, function signatures (later versions parse
uuids in the generated code), defaults actually being set and added
x-go-type where needed.
2025-03-26 11:13:14 +01:00
Sanne Raymaekers
17416bf60b worker: adapt to new oapi-codegen 2025-03-26 11:13:14 +01:00
Sanne Raymaekers
b2700903ae go.mod: bump github.com/getkin/kin-openapi to v0.131.0
As deepmap/oapi-codegen didn't work with this newer version, upgrade to
oapi-codegen/oapi-codegen v2.

Mitigating CVE-2025-30153
2025-03-26 11:13:14 +01:00
Sanne Raymaekers
c5cb0d0618 Schutzfile: bump osbuild to 142
The next images update needs the updated cloud-init stage.
2025-03-26 08:45:08 +01:00
Sanne Raymaekers
0b11dc6b59 cloudapi/v2: mark md5 signature as required in package metadata
Technically osbuild/osbuild-composer#4564 broke the api spec by marking
a required field as non-required. Fix this by using allOf.
2025-03-21 10:06:42 +01:00
Sanne Raymaekers
d08cedf73b test/cases/api: add modules 2025-03-20 14:07:52 +01:00
Sanne Raymaekers
ec93197b7a cloudapi/v2: add some unit tests for testing modules 2025-03-20 14:07:52 +01:00
Sanne Raymaekers
241aae6fd4 cloudapi: support dnf modules
Exposes enabled modules in the api.
2025-03-20 14:07:52 +01:00
Sanne Raymaekers
d6fe9d85cf weldr: adapt tests to modularity 2025-03-20 14:07:52 +01:00
Sanne Raymaekers
52e5fe9627 weldr: add enabled modules to depsolve handler 2025-03-20 14:07:52 +01:00
Sanne Raymaekers
9c62e68aa7 blueprint: add enabled modules to blueprint 2025-03-20 14:07:52 +01:00
Ondřej Budai
cdb709f7f7 test: don't install wget in the openshift virt test
curl can do the job just fine, and it's already installed. Let's just
use it.
2025-03-20 09:50:17 +01:00
Ondřej Budai
5a76595fe9 test: retry uploads in the openshift virt test
The networking to the cluster seems slightly flakey, so I noticed
a few failures when playing with it. A little retry is able to fix it.

The function was taken from deploy.sh. I considered de-duping it,
but deploy.sh runs in a context where
/usr/libexec/tests/osbuild-composer/shared_lib.sh is not yet
established, so it's unfortunately no so simple. :(
2025-03-20 09:50:17 +01:00
Ondřej Budai
8f48d4f746 test: migrate the openshift virt test to a new cluster
The old one is going to be decommissioned. I only changed:
- extracted the storage class to a variable
- adjusted the openshift yaml file to what I was given in the UI
  - most importantly, we now use an instancetype to specify the
    resource requirements instead of doing it manually
  - the network is called default, instead of nic0 on this cluster
- we are downloading the oc and virtctl clients from the new cluster
  so the versions match
2025-03-20 09:50:17 +01:00
schutzbot
9ac85a459d Post release version bump
[skip ci]
2025-03-19 08:13:45 +00:00
Michael Vogt
4584d05eff cloudapi: silence logrus in tests
This commit discards the logrus output when the tests are run. That
might be a controversial change but the amount of redundant output
that drowns the actual failures makes it very hard to work with
these tests.
2025-03-10 20:20:00 +01:00
Sanne Raymaekers
536b7d95c5 go.mod: update osbuild/images to v0.123.0
Includes modularity support.
2025-03-10 17:56:19 +01:00
Brian C. Lane
5e3d6aff54 cloudapi: Add a test for metadata returning the compose request
Related: RHEL-60120
2025-03-05 12:36:36 +01:00
Brian C. Lane
d8e9a86921 cloudapi: save and return compose request details
The original compose request contains useful details that are not
preserved when it is converted to a manifest. Things like the
distribution, arch, image type, blueprint or customizations are useful
when examining builds later.

This saves the original request json using the job id and a new
directory (ComposeRequest) under the artifacts directory. The original
request, if present, is then added to the compose/<id>/metadata response
alongside the package list.

Related: RHEL-60120
2025-03-05 12:36:36 +01:00
Brian C. Lane
199a3d31f8 worker: Expose the ArtifactsDir path
This will help make it easier to write the original compose request json
to the same directory tree.

Related: RHEL-60120
2025-03-05 12:36:36 +01:00
Brian C. Lane
a394d1a498 cloudapi: Fix href for metadata responses
Related: RHEL-60120
2025-03-05 12:36:36 +01:00
Brian C. Lane
c0bf89b51f openapi: Add ComposeRequest as part of the ComposeMetadata response
This will allow clients to display more information about a compose,
including the image type created, arch and distro, and blueprint to
customizations used to create it.

Related: RHEL-60120
2025-03-05 12:36:36 +01:00
Florian Schüller
30198922a5 templates/dashboards: increase timespan readability
Also introduces "50min." as we use this now and
shorten some titles to see which charts are affected by
the `target_duration`.
2025-03-05 10:27:54 +01:00
schutzbot
4fc4ce8778 Post release version bump
[skip ci]
2025-03-05 08:13:56 +00:00
Tom Koscielniak
a1a6722ed4 tests/CI: Disable installer test for RHEL 10.0 nightly
Disable installer test because it will keep failing due to the fix for dracut missing ifcfg won't make RHEL 10 nightly composes.
2025-03-05 08:17:02 +01:00
Florian Schüller
e8059fde2f CODEOWNERS: set people for /templates 2025-03-04 17:48:18 +01:00
schutzbot
6d2d02027a schutzfile: Update snapshots to 20250225 2025-02-28 12:56:30 +01:00
Tomáš Hozza
985e582953 osbuild-composer/config: update distro aliases for RHEL 9 and 10
Bump the `rhel-9` and `rhel-10` distro aliases to the next
in-development releases, because we don't plan to land any new releases
in 9.6 or 10.0.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-28 09:35:23 +01:00
Tomáš Hozza
8a4f093af6 Test/repositories: add RHEL 10.1 and 9.7 configs
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-28 09:35:23 +01:00
Tomáš Hozza
06e232b55e go.mod: update osbuild/images to v0.120.0
This adds the RHEL 10.1 and 9.7 repositories

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-28 09:35:23 +01:00
Beñat Gartzia Arruabarrena
d5a77ffcb5 internal/cloud/gcp/compute: Add TDX_CAPABLE guest OS feature
Latest RHEL images (from 9.6 on) should be able to run as TDX guests.
CentOS guests also fully support it at the moment.

See: https://issues.redhat.com/browse/COS-3111
See: https://github.com/coreos/coreos-assembler/pull/4006
See: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5979
2025-02-27 13:33:22 +01:00