Commit graph

29 commits

Author SHA1 Message Date
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
Christian Kellner
cde65d1f74 CI: run rhel8 integration test in PSI
We need access to internal repos, only available in PSI.
2020-09-17 10:48:37 +02:00
Christian Kellner
d4f0b169a0 composer: update to master/8ccbde8
This is right when PR-952 landed, which is what we are updating
from. This will use SSL certification and also re-enable auto
kerberos authorization via config files for composer.
2020-09-17 10:48:37 +02:00
Christian Kellner
b292458771 test: create a compose via koji
Try testing a compose via the koji, which involves creating using
the koji command line plugin to make the XMLRPC call to koji hub,
where the osbuild koji hub plugin verifies the parameters and then
creates the task. The osbuild koji plugin for the builder is then
picking up the task, and uses composer's koji API to request a
compose. Once this is successful it will be imported by composer
into koji via the 'CGImport' method.
The `koji osbuild-image` command waits for all this and reports
whether the task was successful or not via its exit code (and
on stdout).

This uses a fleet of containers: a database one, a kerberos kdc
one, another one for the koju hub and finally one for the koji
builder. The pre-build RPMs are used to install the plugins.

NB: On RHEL we need to manually install the `dnsname` podman
plugin, since it is missing, but required so that containers
can address each other by hostnames.
See [schutzbot/vendor/README.md](schutzbot/vendor/README.md)
2020-09-10 18:41:13 +01:00
Tom Gundersen
a416570ea2 schutzbot: add CI integration
The CI is in two stages, for each supported distro.

First the RPMs are generated from the spec file in the repo for the
given distro and architecture.

Once all the RPM builds have succeeded successfully, a test machine is
provisioned with osbulid-composer installed, and koji API enabled.

The repository containing the RPMs of the code being tested is also
enabled on the test machine, and the cli client is installed.

Finally, the test/integration.sh script is executed, which currently
does nothing.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-09-10 00:05:44 +02:00