Commit graph

391 commits

Author SHA1 Message Date
Alexander Todorov
17dd9582c8 Enable Dependabot 2021-10-05 11:08:25 +02:00
Christian Kellner
2b324d3d89 plugin/cli: remove type annotation
Remove the single string type annotation; it does not gain us much and
seems to be the only thing missing for python 2.7 (RHEL 7) support.
2021-08-17 02:28:07 +02:00
Alexander Todorov
f569c38ea9 Add support for GitLab CI
and remove Jenkins related files
2021-07-29 11:19:33 +02:00
Alexander Todorov
e778771f2b Remove rhel.repo to avoid dnf being confused
when building the containers the initial `dnf upgrade` will download
content from the latest nightly trees which turns the container into a
Beta system and subsequent `dnf isntall` gets confused!
2021-07-29 11:19:33 +02:00
Ondřej Budai
3f54467fd4 deploy: add a workaround for a dnf bug on F34 2021-07-23 15:24:05 +02:00
Ondřej Budai
3e69cea6fd mockbuild: use s3cmd put instead of sync to speed up the RPM upload
s3cmd sync actually downloads metadata for all objects in a s3 bucket.
We have built a lot of RPMs, thus this takes 5 minutes on AWS and 25 minutes
on my laptop (!!!).

Let's use recursive put instead. This doesn't delete any files on the remote
side. As we upload RPMs only once, this also shouldn't fail on "the
object already exists". Using this method, we should be able to upload the
RPMs in seconds.

The same patch was applied in osbuild-composer cf73edd2
2021-07-23 15:24:05 +02:00
Ondřej Budai
3ceeb47333 tests: change all mentions of Fedora 32 to Fedora 33
Fedora 32 is EOL, let's use Fedora 33. (Fedora 34 is not yet
100% supported in composer).
2021-07-23 15:24:05 +02:00
Ondřej Budai
ad157cc206 ci: add Fedora 34
It's released!
2021-07-23 15:24:05 +02:00
Ondřej Budai
badf0034ea ci: remove Fedora 32
it's EOL
2021-07-23 15:24:05 +02:00
Ondřej Budai
0ea82ee08c ci: upload rpms built in RHEL 8 CDN buildroot into rhel-8-cdn directory
Let's explain how RPMs for RHEL are built:

We use a subscribed RHEL 8.x machine and mock build these on it. Mock
initializes its own buildroot based on the latest RHEL 8 CDN content, see[1].
This means that the minor version of the buildroot is independent of the minor
version of the host.

However, we currently upload RPMs to a directory whose name consists also of
the minor version of the host. Our hosts are currently running RHEL 8.3 so
the RPMs are uploaded into rhel-8.3 directory despite them being built in the
RHEL 8.4 buildroot (RHEL 8 CDN buildroot specifically). This means that
we cannot guarantee that they are installable on RHEL 8.3 which is weird.

This commit adds a special case for hosts that run on subscribed RHEL and
thus build RPMs in a buildroot constructed from RHEL CDN. These RPMs are
now uploaded into rhel-8-cdn directory. This change more accurately reflects
the way we build our RPMs and removes some confusion.

Also, we need to bump osbuild commit so we have a version that already has
the rhel-8-cdn change in it.

This also bumps all deps so we have rhel-8-cdn repos everywhere.

[1]: https://github.com/rpm-software-management/mock/blob/main/mock-core-configs/etc/mock/templates/rhel-8.tpl#L37
2021-07-23 15:24:05 +02:00
Ondřej Budai
748e08d434 mockbuild: move registration on top of the file
we did the same in osbuild and composer
2021-07-23 15:24:05 +02:00
Christian Kellner
345265e9d2 test/builder: check manifest fetching
Add a test that checks that manifests are indeed uploaded and
another test that simulates a failure while fetching manifests.
2021-02-25 16:01:51 +01:00
Christian Kellner
efc648f32a builder: fetch manifests for the compose
Add support for fetching manifests via the compose/<id>/manifests
API endpoint. A failure to fetch them is not critical, since it is
possible the manifests don't exist, e.g. when depsolving fails.
The manifest is attached per image request.
2021-02-25 16:01:51 +01:00
Christian Kellner
db6d4645df gitignore: ignore vscode files
IDE related files; ignore them.
2021-02-25 16:01:51 +01:00
Ondřej Budai
df5803face test/deploy: bump both osbuild and osbuild-composer 2021-02-25 14:46:34 +01:00
Ondřej Budai
a425e5fa4d test/deploy: equalize the priority of the osbuild-composer repo
We know longer ship osbuild in the osbuild-composer repository, therefore this
is no longer needed.
2021-02-25 14:46:34 +01:00
Ondřej Budai
0bcac397a3 test: remove the podman-plugins workaround
Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1877865 is now shipped in
8.3.
2021-02-25 14:46:34 +01:00
Ondřej Budai
72ffb61346 ci: trigger schutzbot from github action
Previously, we had a webhook relay. It received a notification from Github
and sent it to AWS SQS. Now, the webhook is dead. The new method (already used
in osbuild-composer and image-builder) is to send the notification directly
from a github action to AWS SQS.
2021-02-25 14:46:34 +01:00
Ondřej Budai
4fdc457745 test/integration: define podman network gateway manually
Podman 2.2.0 doesn't create a gateway by default. See:
https://github.com/containers/podman/issues/8748

This commits introduces a workaround: specifying the gateway manually.

Note that the gateway is used in test/run-builder.sh
2020-12-16 15:32:28 +01:00
Ondřej Budai
a28e4ab9af schutzbot: remove dnf upgrade
Fedora 31 is EOL. We don't need this anymore.
2020-12-16 15:32:28 +01:00
Ondřej Budai
8c0161a62a schutzbot: remove systemd-journald restart
There's no bug referenced so I have no idea what's wrong. We did the same
change in composer and nothing broke so let's do the same thing here.
2020-12-16 15:32:28 +01:00
Ondřej Budai
9e3e02e693 schutzbot: remove dnf hacks
We want to use `dnf` in the same way as our users do. This means we want the
modular repositories and weak deps enabled. Fastestmirror is fine, it doesn't
change the content set nor depsolving.

Also, this is a workaround for rhbz#1908352, tl;dr: installing podman without
weak deps makes it unusable on Fedora 32.
2020-12-16 15:32:28 +01:00
Ondřej Budai
4603578b62 test/integration.sh: install podman-plugins from RPMRepo
The nightly disappeared again. We now have an 8.4.0 snapshot that contains
the package. Let's use it.
2020-12-16 15:32:28 +01:00
Ondřej Budai
eae9efeba9 schutzbot: add Fedora 33 tests
Why not?
2020-12-02 19:04:30 +01:00
Ondřej Budai
44ef47262c mockbuild: don't install rpm-build
It's not used for anything.
2020-12-02 19:04:30 +01:00
Ondřej Budai
0c99963ffb mockbuild: install s3cmd from repositories
There's no need to install it from pip, it's in the repositories. Also,
s3cmd for Fedora 33 contains a downstream fix for Python 3.9 compatibility.
2020-12-02 19:04:30 +01:00
Ondřej Budai
3e77ed579b schutzbot: fix the name of koji-osbuild repository
It's confusing in the logs.
2020-12-02 19:04:30 +01:00
Lars Karlitski
d9cb6217ef test/integration.sh: bump nightly
The current one is not available anymore. We cannot use rpmrepo for this
yet, because the podman-plugins package is too new.
2020-12-01 10:48:08 +01:00
Christian Kellner
c282b9b1f0 test: replace docker.io with fedora's registry
In order to avoid running into docker.io's new download limit,
use the container directly from registry.fedoraproject.org.
2020-11-22 23:53:38 +01:00
Lars Karlitski
b936e1e9f1 mockbuild: use mock to build source rpm
Running `meson build` on the host can have different results from
building the SRPM in mock.
2020-11-20 19:37:45 +01:00
Lars Karlitski
5bd74d3fa2 koji-osbuild.spec: don't generate from .in file
Remove koji-osbuild.spec.in and the bits in meson.build that generate
the final spec file out of it. Pull in the changelog from how Ondřej
Budai does it in osbuild-composer, because it's adorable.

When releasing, the version now has to be bumped in the spec file.

This is to make it consistent with other osbuild projects, and to
simplify reverse dependency testing.
2020-11-20 19:37:45 +01:00
Lars Karlitski
1c13e8106f mockbuild: move installing dependencies down
These don't need to run when we're not building anything.
2020-11-20 19:37:45 +01:00
Lars Karlitski
acfc50788a mockbuild: don't build repository when it already exists
This avoids doing unnecessary work and speeds up restarting tests.
2020-11-20 19:37:45 +01:00
Lars Karlitski
2ac9a5b73c schutzbot: don't copy dnf repo file between stages
Repository URLs are predictable. There's no need to use Jenkins' stash
feature to pass the repo file between stages.

Instead, simply create the repo file where it is needed, in deploy.sh.
2020-11-20 19:37:45 +01:00
Lars Karlitski
cc2de53747 mockbuild: change repository path
Change the repository path on S3 to a more predictable one, mirroring
the pattern we're using for osbuild-composer.

Notably, don't use short commit ids. The length of these is not
predictable. It depends on the shortest unique prefix in the repository
and git configuration.

For example, koji-osbuild commit $SHA for fedora-33 on x86_64 will
result in this URL:

koji-osbuild/fedora-33/x86_64/$SHA
2020-11-20 19:37:45 +01:00
Lars Karlitski
758dc70d85 mockbuild: remove unused variable 2020-11-20 19:37:45 +01:00
Lars Karlitski
444c1cc006 mockbuild: remove unused logs
These logs are not preserved, just remove them.
2020-11-20 19:37:45 +01:00
Ondřej Budai
d9742a669c schutzbot: bump the osbuild-composer version to 25 2020-11-19 22:18:04 +01:00
Christian Kellner
8d40d9ae54 3
This completes the development of koji-osbuild version 3.
2020-11-19 14:38:32 +01:00
Christian Kellner
5147599093 NEWS.md: prepare for release version 3
Lots of new features and improvements to testing. New `tests`
sub-package.
2020-11-19 14:38:32 +01:00
Christian Kellner
d0216a7ef0 test: copy the plugin in the run scripts
If called from within the source directory, i.e. the local plugin
exists, copy those to the share directory so they can be picked
up by the entry point scripts, in case the rpms are not found.
2020-11-19 11:22:54 +00:00
Christian Kellner
b74e440028 test/make-tags: add Fedora-IoT to f32-candidate
This is just for local testing of Fedora IoT commits, which should
be named properly.
2020-11-19 11:22:54 +00:00
Christian Kellner
8705c0aa68 test/container: ensure koji plugin paths exist
When using the local plugin, ensure the destination plugin path
exists before copying, otherwise it will fail.
2020-11-19 11:22:54 +00:00
Christian Kellner
ba25e0f3d7 test: use absolute path in run-builder.sh
In case `TEST_PATH` was not specified as command line argument,
it was falling back to `test`. Make the latter an absolute path,
by pre-pending `PWD`, otherwise podman complains about the name
of the volume.
2020-11-19 11:22:54 +00:00
Christian Kellner
c826db38e7 test: match container version to host
Instead of just using the "latest" container everywhere, which will
change every time a new release is made, add a build argument to
specify the version and then match that version to the host in all
the build scripts. This will make it possible to use the tests for
gating, and ensure that we test the plugins on the OS version that
is targeted.
2020-11-19 11:22:54 +00:00
Christian Kellner
d60dd9f362 test: make hub container self contained
Instead of building on the existing quay.io/osbuild/koji:v1, and
then replacing a lot of it (entry point), move the packages and
the dnf.conf change over from the former base and then directly
depend on Fedora. This gives us more control, especially over
what Fedora version is being used.
2020-11-19 11:22:54 +00:00
Lars Karlitski
16f762c2ed test: move to koji-osbuild-tests package
This is similar to how other osbuild packages are testing: everything
that's needed for testing is included in the tests package or a
dependency of it. The test runner then runs every executable in
/usr/libexec/tests/<packagename>. This gives a simple test API to
projects depending on this package (notably osbuild-composer).

The local development workflow described in HACKING.md is meant to
continue to work. To ensure this, all relevant scripts gained a
TEST_DATA variable, which defaults to `./test`, but is set from $1 to
the installed path from integration.sh.
2020-11-19 09:28:28 +01:00
Lars Karlitski
ade02b0c9a test: pull podman-plugins from internal RHEL repo
Instead of taking podman-plugins from the source directory, use the one
that will be released into RHEL 8.3.1.

This will simplify moving tests into an rpm.
2020-11-19 09:28:28 +01:00
Christian Kellner
c2b5bd7060 builder: attach koji init/import logs
De-serialize the koji init and import logs, required fields in the
ComposeLogs, and if non-empty, attach them to the task.
Update the tests to check for the presence of these logs.
2020-11-17 16:05:39 +01:00
Christian Kellner
68309e4b5a builder: use koji_build_id from ComposeStatus
Instead of getting the `koji_build_id` from the direct reply of
the compose request call, use the one returned in the compose
status.
The reason behind this is that composer was changed so that the
CGInitBuild call to koji is now being done by a worker and not
composer itself. This means that once the compose request call
returns, the build id is not yet known. In composer release 24,
the compose request call internally waits for the worker that
does the CGInitBuild API call, but that will be changed, and
the koji_build_id will then not be returned from the compose
request API call anymore. This prepares for that. The tests are
also adapted to simulate the new behavior.

NB: this makes composer 24 a dependency, since the build id is
taken from the ComposeStatus, which was only added there.
2020-11-17 13:35:52 +00:00