Commit graph

6997 commits

Author SHA1 Message Date
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
Tom Koscielniak
9b850de9f1 tests/CI: Re-enable the vmware tests on RHEL 10
Re-enable the vmware tests on RHEL 10 and use vcenter 8 instead of 6. This fixes the issues caused by outdated CPUs in old cluster by migrating to a new one with new hosts as well.
2025-02-25 16:29:20 +01:00
Tom Koscielniak
0dcbece2ca CI: Update slack notifications and remove Alex
Remove Alex from Slack CI notifications, add Achilleas and tag only on failures.
2025-02-25 13:35:44 +01:00
Brian C. Lane
96715c3106 cloudapi: Use constants for distro in compose_test.go
This will make it easier to update next time the distribution version
needs to be bumped.
2025-02-24 13:26:40 +01:00
Brian C. Lane
06bc5d4d59 Makefile: Run golangci-lint config verify
This more closely matches the behavior of the github action.

In the .golangci.yml config file move the exclude-dirs list under issues
where it belongs.
2025-02-24 04:20:42 -08:00
Brian C. Lane
0256e09031 lint: Clean up golangci-lint v1.60 complaints
This cleans up the linting results by adding checks for
integer underflow/overflow in several places, suppressing the error in
places where it has been checked, or fixing the types when possible.
2025-02-24 04:20:42 -08:00
Brian C. Lane
2dad1a965e Makefile: Move to golangci-lint v1.60
Version 1.56 pulls in 1.22.0 which is too low for our go.mod version of
1.22.6 and v1.59 pulls in go v1.22.5

So move to 1.60 which pulls in 1.23, which should work fine after some
new linting complaints are addressed.
2025-02-24 04:20:42 -08:00
schutzbot
7da223c957 Post release version bump
[skip ci]
2025-02-20 18:35:46 +00:00
schutzbot
3d8bdb58a6 schutzfile: Update snapshots to 20250218 2025-02-20 17:46:40 +01:00
Achilleas Koutsou
5817db95f8 go.mod: update osbuild/images to v0.118.0
Replace ifcfg with net-lib for EL10 and F42 installers.

In RHEL 10 and Fedora 42, the ifcfg module was replaced by net-lib.

This PR removes ifcfg from common anaconda dracut stage modules and adds
either ifcfg or net-lib to each installer based on distro version.
2025-02-20 15:14:58 +01:00
Michael Vogt
2fc64aeaca test: tweak cross-build.sh test to look at latest released images
This commit tweaks the `cross-build.sh` to checkout the last release
tag of the images library instead of using main. The issue with using
main is that there are many false positive errors when e.g. a new
fedora release is added to main.

Ideally it would use the tag of the vendored images library but
this particular test looks at the rpm content so the information
what version of images was used is not readily available (we could
fix this but the workaround of this commit is hopefully sufficient).
2025-02-19 19:19:42 +01:00
Michael Vogt
f237af9bda cloudapi: move fedora-39 test forward to fedora-42
This commit fixes the failing TestGetImageRequests_BlueprintDistro
test. It fails because fedora-39 is no longer part of the supported
distros and can no longer be build. Move to fedora-42 so that we
have a bit time before we need to update it again.

It also updates TestGetImageRequests_NoRepositories to point to
fedora-42.
2025-02-19 19:19:42 +01:00
Michael Vogt
409b4f6048 go.mod: update to images@v0.117.0
This commit updates to images v0.117.0 so that the cross-distro.sh
test works again (images removed fedora-39.json in main but the
uses the previous version of images that includes fedora-39 so
there is a mismatch (we should look into if there is a way to
get github.com/osbuild/images@latest instead of main in the
cross-arch test).

It also updates all the vendor stuff that got pulled via the
new images release (which is giantonormous).

This update requires updating the Go version to 1.22.8
2025-02-19 19:19:42 +01:00
Michael Vogt
886ddc0bcc test: debug print INSTALLED_DISTROS in cross-distro.sh
Add more information when the cross-distro.sh test fails. Currently
it prints:
```
DEBUG: ===== ALL_DISTROS ====
rhel-8
...
rhel-8
DEBUG: ===== ALL_EXPECTED_DISTROS ====
fedora-40
...
fedora-42
DEBUG: ===== ALL_REMAINDERS ====
rhel-8
....
rhel-8
DEBUG: ===== END ====
Some distros are missing!
Missing distros:
```
But the most crucial information (i.e. what is installed) is
missing from this debug print (it can be found in a different
output but lets make it easy).
2025-02-19 19:19:42 +01:00
Michael Vogt
35167ce83f many: update for new reporegistry.New() api (c.f. pr#1179)
This commit updates osbuild-composer for the new API in images
for the `reporegistry.New()`. The main incompatible change is
that the `/repositories` part is not longer automatically added
inside the library so we need to add it on the call-site.

This needs https://github.com/osbuild/images/pull/1179
2025-02-19 19:19:42 +01:00
Michael Vogt
13329ebb2e go.mod: update images to v0.116.0 2025-02-19 19:19:42 +01:00
dependabot[bot]
9a2bc91f99 build(deps): bump stackrox/kube-linter-action from 1.0.5 to 1.0.6
Bumps [stackrox/kube-linter-action](https://github.com/stackrox/kube-linter-action) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/stackrox/kube-linter-action/releases)
- [Commits](https://github.com/stackrox/kube-linter-action/compare/v1.0.5...v1.0.6)

---
updated-dependencies:
- dependency-name: stackrox/kube-linter-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-19 14:56:38 +01:00
schutzbot
26d65df16a Post release version bump
[skip ci]
2025-02-19 08:14:01 +00:00
Achilleas Koutsou
aac74da605 tools: add patch version check to prepare-source.sh
Use endoflife.date to check for newer versions of the minor Go version
we're using and print a notice.
2025-02-17 12:42:35 +01:00
Achilleas Koutsou
231ee2896c tools: use go toolbox instead of installing a binary
Repeat of 8554d6202d.

This is a much nicer (and newer) way of handling the Go version for the
project.  The issue that caused the previous revert was that the toolbox
version was being set to 1.22.0, which is older than what some
dependencies require, specifically osbuild/images, so the 'go mod tidy'
would downgrade images to match the required toolbox version.

Setting the go and toolbox version to 1.22.6 should make it all work as
expected.

This reverts commit 7e87d1e124.

Co-authored-by: Lukáš Zapletal <lukas@zapletalovi.com>
2025-02-17 12:42:35 +01:00
Florian Schüller
5cd2d8a2a9 test/README: image-builder repo was renamed to image-builder-crc 2025-02-14 10:12:29 +01:00
Michael Vogt
97e924b06c test: update cross-distro.sh to take repos from "images"
This commit updates the `cross-distro.sh` test to use the
`images`repository to get all the available image definitions.
2025-02-13 14:00:45 +01:00
Michael Vogt
5906c554f6 cloudapi: update test to use repos from images
This commit updates the cloudapi test that uses the real repositories
to use the version of those from the "images" library. Composer
no longer carries the default repos.

Note that this can most likely be simplified once
https://github.com/osbuild/images/pull/1179
is merged.
2025-02-13 14:00:45 +01:00
Michael Vogt
a9fcf2a411 go.mod: run go mod vendor and add new repos 2025-02-13 14:00:45 +01:00
Michael Vogt
90f069c2eb many: take repositories from the "images" library
This commit changes the spec file so that most of the repositories
are taken from the `images` library. See images PR#1112 for details.

Note that we still need the -no-auth-keys and the centos-stream
symlinks.
2025-02-13 14:00:45 +01:00
Brian C. Lane
74638a9733 workflows: Switch utility workflows to using ubuntu-22.04
We want to use a stable version of ubuntu, not ubuntu-latest which can
change unexpectedly. This switches all the other (non-test) workflows to
use ubuntu-22.04
2025-02-12 13:42:16 +01:00
Brian C. Lane
53d50e875d workflows: Use ubuntu-22.04 for tests.yml
github is dropping support for 20.04 on 4/1/2025 so move to the next
stable version.

Also, back in commit e8ae7e7cae we removed
use of ubuntu-latest because it can change unexpectedly. Some other uses
crept back in, so this changes those to use 22.04 as well.
2025-02-12 13:42:16 +01:00
schutzbot
5bfd06e4ce Post release version bump
[skip ci]
2025-02-12 12:38:21 +00:00
Tomáš Hozza
bb43578d92 osbuild-composer: bump rhel-9 distro alias to rhel-9.6
The alias in the built-in config is meant for on-prem and needs to be
set to the current in-development minor RHEL version.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-12 12:53:36 +01:00
Tomáš Hozza
758870fb15 SPEC: unconditionally undefine gomodulesmode
Unconditionally undefine `gomodulesmode` rpm macro, which by default
disables the Go modules information in the binary. It used to be defined
only on Fedora, but it is now defined on RHEL.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-12 12:53:36 +01:00
Brian C. Lane
25e8bb1202 cloudapi: Fix artefact typo 2025-02-11 16:09:27 +01:00
Brian C. Lane
d47102716c v2_test: Add tests for Download
This enables the artifact directory during the tests, it mocks up a
download artifact, and tests that it can be downloaded. The file
contains JSON because the TestRoute helper expects that as the response.

Related: RHEL-60142
2025-02-11 16:09:27 +01:00
Brian C. Lane
a6f48bcd2f cloudapi: Add error information to ErrorUnknownUploadTarget
It can include useful extra details, whether or not the artifacts
directory is setup, whether the file is missing, etc.

Related: RHEL-60142
2025-02-11 16:09:27 +01:00
Brian C. Lane
3781820b45 server: Return the path alongside the error from JobArtifactLocation
Even though the file isn't there it can be useful to have the full path
that it was checking for.

Related: RHEL-60142
2025-02-11 16:09:27 +01:00
Brian C. Lane
d0be06278c cloudapi: Hook up the /composes/{id}/download handler
Resolves: RHEL-60142
2025-02-11 16:09:27 +01:00
Brian C. Lane
1d0d198e67 openapi: Add composes/{id}/download route
This will download the build artifact from a locally saved osbuild
compose. It will set the filename to the the UUID of the build with the
artifact filename appended. eg. 1dbcc86e-745b-4061-812f-e50f06fa7cbe-disk.qcow2

Related: RHEL-60142
2025-02-11 16:09:27 +01:00
Tomáš Hozza
bdd2014c44 Add initial CODEOWNERS file
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-06 15:47:53 +01:00
Achilleas Koutsou
85e4efe966 go.mod: update to latest images@v0.115.0 2025-02-06 13:48:59 +01:00
Achilleas Koutsou
7e87d1e124 tools: revert prepare-source.sh to use downloaded go binary
The new script can cause changes to the go.mod when executing
`go get go@version`, downgrading packages that we want to bump, which
can revert changes we want the tool to be tidying.

We can work around this for now, but with the script being part of our
PR checks, we also need to revert the script so we can get module
updates through.

This reverts 8554d6202d
2025-02-06 13:48:59 +01:00
Achilleas Koutsou
448b1e276d test/filesystem: print blueprint contents when creating file
Can be useful for troubleshooting and tracing test logs.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
a237447ca0 gitlab: run all versions of filesystem.sh
Run filesystem.sh with all the valid arguments for the customization
type.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
077a56b9ac test/filesystem: minor cleanups
Remove incorrect comment (not an ostree image).
Add a greenprint for depsolving since it can take some time for that to
run and it makes more sense than pausing output on "Preparing
blueprint".
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
96269e454e test/filesystem: support various layouts
Add separate blueprint creation functions, one for each partitioning
layout:
- disk-plain
- disk-lvm
- disk-btrfs (Fedora only)

The existing 'filesystem' blueprint is also kept.

Each function also sets the $EXPECTED_MOUNTPOINTS variable for the
mountpoint check that happens after the build.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
8e765ad97d test/filesystem: remove conditions on v94
Version 94 of osbuild-composer is over a year old now.  It should be
fine to test these unconditionally.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
4241c1d5a7 test/filesystem: move blueprint writing to function
Move the creation of the blueprint to a function.  We'll then add a
separate blueprint function for the new, alternative partitioning
customization.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
49271e614b blueprint: test the conversion 2025-02-05 11:32:52 +01:00