Commit graph

54 commits

Author SHA1 Message Date
Tomas Hozza
0a026a6573 deploy.sh: drop Fedora 34 specific workaround 2022-08-22 09:58:06 +02:00
Tomas Hozza
85d7120d9f CI: Use Fedora 36, RHEL-8.6 and the latest osbuild and composer
Use latest osbuild and osbuild-composer releases. This is important to
be later able to test direct uploading to the cloud for Koji composes.
Also the mock openid server had to be enhanced to be usable for testing
`koji-osbuild`.

Modify used osbuild-worker configuration to use JWT for authentication
with composer. Update configurations of both, composer and worker to
handle multi-tenancy.

Do not start any services in `schutzbot/deploy.sh`, because at that
point, none of the configuration files are in place.

Ensure that the correct units are started and masked by
`test/integration.sh` to simulate the Service scenario more closely.
This means that the local worker is masked and only remote worker is
started.

Co-authored-by: Jakub Rusz <jrusz@redhat.com>
2022-08-22 09:58:06 +02:00
Tomas Hozza
faa40f1060 Schutzbot: add thozza's SSH key to team keys 2022-08-22 09:58:06 +02:00
Ondřej Budai
5575282ab3 spec: don't push tests into Fedora
koji-osbuild-tests is dependent on osbuild-composer-tests but this package
is not shipped into Fedora because it provides zero value to users.

Let's do the same for koji-osbuild. koji-osbuild-tests will be built only
in our upstream CI but not built in the official Koji.
2022-03-24 00:01:22 +01:00
Christian Kellner
f559c18079 plugins: support for repo package sets
This adds support for specifing the package sets for repositories;
on the command line this can be done via `--repo-package-set` with
and argument of `;` separated package set names. This will result
in repo information being transported via dict instead of plain
strings. Thus the hub plugin's schema was modified accordingly.
Last but not least, the builder plugin now can decode these dicts
and setup the repos accordingly.
Test were added for plugins as well as the integration test changed
to use this new feature.
The first upstream commit that supports this feature is pinned.
2022-02-15 17:35:29 +01:00
Christian Kellner
ce21817676 schutzbot: pin composer (need integrated API)
Update composer to a commit that includes the new integrated
cloud API as well as exposing all the image types via it.
2022-02-11 16:36:07 +01:00
Christian Kellner
c1a887a9a9 test: switch to using oauth/sso
Switch the authentication method that the koji builder plugin
uses from mTLS to SSO. Since we are using the mock openid
server from the `osbuild-composer-tests` package. Make this
package a dependency of `koji-osbuild-tests`.
2022-02-02 13:33:21 +01:00
Christian Kellner
1530f91794 ci: switch from rhel 8.4 to 8.5
Composer stopped building RPMs for 8.4, so we cannot pin commits
for new versions anymore. Switch to 8.5.
Update terraform commit accordingly.
2022-01-31 18:44:28 +00:00
Christian Kellner
4f0dcb8a7b schutzbot: don't start weldr API
We don't use that api, so let's disable it, otherwise it might
want to load repo configurations and fail; but we don't need
them anayway.
2022-01-31 18:44:28 +00:00
Christian Kellner
cd1928d8f3 schutzbot: update osbuild to 46
osbuild 30 is quite old, use a new one.
2022-01-28 18:02:43 +00:00
Ondřej Budai
cd8703640b schutzbot: remove ssh keys of team member that left us
bye 😢

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-01-05 13:08:54 +01:00
Ondřej Budai
4b1e61045e gitlab: do not save the journal 2021-10-21 13:41:56 +02:00
Ondřej Budai
3c82326129 mockbuild: rotate a variable name 2021-10-21 13:41:56 +02:00
Ondřej Budai
26073e04b8 mockbuild: do not subscribe
All runners are already subscribed.
2021-10-21 13:41:56 +02:00
Alexander Todorov
4a751c1386 Handle RHEL subscriptions like in osbuid-composer repo 2021-10-05 12:18:46 +02:00
Alexander Todorov
ffc9ada217 Update Fedora-33 test runners
See
https://github.com/osbuild/koji-osbuild/pull/62#issuecomment-924369341,
95f8bd253b

Also requires to update the names of 8.4 runners.
2021-10-05 12:18:46 +02:00
Alexander Todorov
f569c38ea9 Add support for GitLab CI
and remove Jenkins related files
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
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
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
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
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
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
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
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
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
ff1fd7a38e schutzbot: prepare for master → main rename
Prepare for the rename of the master branch to main.
2020-11-16 19:43:26 +01:00
Christian Kellner
00cffce22f schutzbot: use predictable dnf repo
Now that osbuild and osbuild-composer use predictable destinations
for their dnf repositories, those can be used and auto-generated
from the environment and a specific git commit (identified by
the hash).
This will make updating easier, because the only thing we need to
change is the commit hash.
For osbuild-composer the latest release is used, for osbuild the
predictable repos were introduced after the latest release, so
the commit that introduced the feature is used.
2020-11-16 19:43:26 +01:00
Christian Kellner
2c37256f65 ci: use api socket, not koji socket
Instead of installing and enabling the koji socket, use the new
api socket. The koji socket is not properly wired up anymore
and any attempt to actually use it with hang.
2020-11-10 12:31:08 +01:00
Christian Kellner
f6b493f60c ci: update composer to release 23 for Fedora 32
Also update the Fedora CI to osbuild 23, so that it is in sync
with the RHEL ci. This is important since the koji socket has
been deprecated by the api socket and the koji socket actually
does not work anymore.
2020-11-10 12:31:08 +01:00
Ondřej Budai
90945ee509 composer: update to osbuild-composer 23 2020-11-10 12:31:08 +01:00
Ondřej Budai
67ee36d24d schutzbot: update the repository directory to RHEL 8.3
Schuztbot now uses RHEL 8.3 image. It's needed to change the repository
directory from 8.2 to 8.3 to accommodate the switch.
2020-11-10 12:31:08 +01:00
Christian Kellner
b9c3a3d2f9 all: sync with composer changes
Upstream composer has introduce a few changes that we need to
adapt for:

 - the koji composer API is now exposed on the standard https
   port (443). Thus koji hub and web need to move to a different
   pair: 8080 (http) and 4343 (https). Change the scripts and
   tests for that

 - the koji API gained a prefix 'api/composer-koji/v1/'. Change
   client and unit tests to use that prefix. Use urljoin to
   create new APIs

 - composer configuration format (osbuild-composer.toml) has
   changed and now also includes configuration for the CA
   and allowed domains

 - update the composer RPM repositories to the commit for the
   21 upstream release.
2020-09-25 22:33:31 +01:00