Commit graph

66 commits

Author SHA1 Message Date
Achilleas Koutsou
3de57ae9a7 mockbuild: add RHEL 8.6
- CI runners
- Subscription override for mock templates
- Terraform SHA for 8.6 runners

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-10-05 15:57:45 +02:00
Sanne Raymaekers
36a7475e26 schutzbot: Update terraform sha
Unbreaks fedora-33 updates-modular dnf error when installing the
gitlab-runner.
2021-09-21 16:00:08 +02:00
Ondřej Budai
b24f9858c3 schutzbot: update images for RHEL 9
Previously:
We used images built from pre-mass-rebuild composes but installed packages
from post-mass-rebuild composes. This caused weird stuff like sshd crashing
when installing non-related packages via dnf.

Now:
Both the image and repositories are post-mass-rebuild ones. This should solve
these weird issues.
2021-08-19 01:42:40 +02:00
Ondřej Budai
124cda90e2 mockbuild: add rhel 9 2021-07-22 17:58:41 +02:00
Ondřej Budai
ea7eee8db6 ci: update composer to make tests more robust
f8fd3d04 switched F33 image tests to use rpmrepo rather than kernel mirrors
that are sometimes desynced. This should make the testsuite more stable.
2021-07-14 23:51:05 +02:00
Ondřej Budai
8396e73372 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.

[1]: https://github.com/rpm-software-management/mock/blob/main/mock-core-configs/etc/mock/templates/rhel-8.tpl#L37
2021-07-12 19:02:21 +02:00
Ondřej Budai
41e01326f0 mockbuild: register the host as soon as possible
So we can check if we are subscribed in the variable definitions.

I believe that registering the instance will go away soon nevertheless.
2021-07-12 19:02:21 +02:00
Ondřej Budai
54f233ac96 mockbuild: use REPO_BUCKET when defining the repo's base URL
Just deduplication of code.
2021-07-12 19:02:21 +02:00
Jakub Rusz
e5d599d8ee ci: add Gitlab CI
This is an inital commit that enables the use of Gitlab CI.
2021-06-30 19:54:37 +02:00
Jakub Rusz
803c698f9a ci: Remove Jenkins in favor of Gitlab CI
Jenkinsfile and the trigger are no longer neccessary since
we're moving all testing to Gitlab CI.
2021-06-30 19:54:37 +02:00
Ondřej Budai
7765c53ecc 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-06-10 09:35:04 +01:00
Ondřej Budai
b5e324c874 ci: remove Fedora 32 tests
It's EOL.
2021-06-04 15:08:38 +02:00
Ondřej Budai
ef0939db9b ci: remove RHEL 8.4 tests
RHEL 8.4 is now GA, so we don't need any extra tests for it. This should also
make the CI more reliable because having two distros with the same DISTRO_CODE
caused some tests to fail randomly (they used the same intermediate
artifacts).
2021-06-04 15:08:38 +02:00
Achilleas Koutsou
1476b88dcf schutzbot: add RHEL 8.5 2021-04-19 09:12:21 +02:00
Alexander Todorov
6c68e45dbe ci: Start running image tests against 8.4
Refs https://github.com/osbuild/osbuild-composer/issues/962
2021-03-30 11:38:47 +03:00
Aleksandar Todorov
33db6cbd2f ci: Excute image_tests directly from osbuild-composer-tests
instead of duplicating the same script here!

Specifies needed cloud credentials.

NOTE: don't start osbuild-composer in deploy.sh because this is
now done by /usr/libexec/osbuild-composer-test/provision.sh. Otherwise
leads to errors because the socket is already taken.
2021-03-26 19:02:57 +00:00
Aleksandar Todorov
775dceaf20 tests: Save osbuild.repo file under artifacts
makes it easier to grab if we need it for manual testing or
in case one needs to download the RPMs from Schutzbot
2021-03-10 12:00:49 +02:00
Ondřej Budai
555b5d0f2b schutzbot/deploy: remove the RHEL 8.3 Beta workaround
These days are long gone, we no longer test osbuild against development RHEL
versions. This is covered by osbuild-composer's test suite.
2021-03-07 12:50:06 +00:00
Ondřej Budai
3028402e71 schutzbot/deploy: bump to osbuild-composer 29
It was set to osbuild-composer 24, so old.
2021-03-07 12:50:06 +00:00
Ondřej Budai
a4ae503c29 schutzbot/mock: fix centos stream 8 build
The centos stream 8 config was renamed in mock-core-config, see:
75cd9eb52d
2021-03-02 09:24:54 +00:00
Aleksandar Todorov
e4e527b5b7 schutzbot: build osbuild for aarch64 RHEL8/CentOS 8
needed for
https://github.com/osbuild/osbuild-composer/pull/1229
2021-02-23 19:23:32 +01:00
Tom Gundersen
6f1350d72d schutzbot/mock: add more distros
This builds osbuild in F33aarch64 as well as RHEL8.4 and CentOS8. No tests are currently run.

With the mockbuilds in place we will be able to run composer CI against osbuild master, when necessary.
2021-02-20 15:16:20 +01:00
Ondřej Budai
dd9099c53a 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-12 17:56:14 +01:00
Lars Karlitski
f5bfb22355 schutzbot: pin osbuild-composer
Pin the osbuild-composer that schutzbot runs a reverse dependency test
against. This allows to control which exact version to test against, and
ensures that PRs against osbuild always run against the same version.

Now that osbuild-composer's CI uploads RPMs to a predictable destination
(the same one that osbuild uses), we can use that instead of rebuilding
osbuild-composer on every CI run. This should speed up the mockbuild
stage considerably.

Pin it to v24 now.
2020-11-15 13:53:45 +00:00
Lars Karlitski
6c325811ed schutzbot/deploy.sh: drop upgrading dnf
According to the comment, this addressed priority bugs that dnf had in
fedora-31. We're not testing on that anymore, because it is end of life.
2020-11-15 13:53:45 +00:00
Lars Karlitski
3405a648f5 schutzbot/deploy.sh: drop dnf overrides
Drop setting fastestmirror, disabling weak dependencies, and removal of
modular repositories.

Try to install as close to what people do in production, which means
sticking to the defaults.
2020-11-15 13:53:45 +00:00
Lars Karlitski
3b8aa32e9c schutzbot/deploy.sh: drop journald workaround
It is not clear which bug this workaround is addressing. Drop it to find
out if it still necessary.
2020-11-15 13:53:45 +00:00
Lars Karlitski
7c44a142a3 schutzbot/deploy.sh: remove retry function
It was only used once, to retry dnf. This is not necessary, because dnf
already has retrying logic. We're also not using `retry` on any of the
other calls to dnf in this script.
2020-11-15 13:53:45 +00:00
Lars Karlitski
efba431e05 mockbuild: move installing dependencies down
These don't need to run when we're not building anything.
2020-11-14 14:13:07 +00:00
Lars Karlitski
4b084e3b64 mockbuild: drop fastestmirror and weakdependencies
Try to be install as close to what people do in production, which means
sticking to the defaults.
2020-11-14 14:13:07 +00:00
Lars Karlitski
c686dbe03a mockbuild: don't build repository when it already exists
This avoids doing unnecessary work and speeds up restarting tests.
2020-11-14 14:13:07 +00:00
Lars Karlitski
2fa87a0e46 schutzbot: don't copy dnf repo file between stages
Now that the repository URLs are predictable, don't 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-14 14:13:07 +00:00
Lars Karlitski
5aee7b9fa7 mockbuild: 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.

Just use the full one, which also makes it easier to copy the id from
`git log` or GitHub.
2020-11-14 13:48:37 +01:00
Lars Karlitski
5b827cb0d5 mockbuild: change repository path
Change the repository path on S3 to a more predictable one. We really
only need the name of the project (static osbuild for this repository),
the name of the distro (use the same as osbuild-composer's API for
consistency) and the commit SHA.

In particular, drop the PR number / branch name. Also don't remove the
dots from version numbers. All places we're using them in (paths and
URLs) support dots.

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

    osbuild/fedora-33/x86_64/xxxxxxx
2020-11-14 13:48:37 +01:00
Lars Karlitski
e3aec65636 mockbuild: move path logic into separate variable 2020-11-14 13:48:37 +01:00
Lars Karlitski
ad2dc139bb mockbuild: remove unused variable 2020-11-14 13:48:37 +01:00
Lars Karlitski
cf3ae337b0 mockbuild: remove unused logs
These logs are not preserved, just remove them.
2020-11-14 13:48:37 +01:00
Lars Karlitski
c19231c44e mockbuild: remove the "latest" repo
This is not used anywhere and something we want to discourage: these
repos are meant for testing, and one ought to know what one tests
against.
2020-11-14 13:48:37 +01:00
Lars Karlitski
cb1823579a mockbuild: rename POST_MERGE_SHA
Jenkins has been configured to use the latest commit on a pull request
(instead of merging to master) for a long time now. Rename the variable
to reflect that.
2020-11-14 13:48:37 +01:00
Lars Karlitski
7228d79003 master → main 2020-11-14 12:03:31 +00:00
Lars Karlitski
ea7acf7051 schutzbot: drop RHEL 8.3 stages
RHEL 8.3 is already GA therefore we don't need to test it anymore!

Based on osbuild-composer 543f1f4 by Ondřej Budai <obudai@redhat.com>.
2020-11-14 12:03:31 +00:00
Lars Karlitski
4c34b2c501 schutzbot: drop collecting AVC logs
This was never in osbuild-composer and fails CI when the log is empty.
2020-10-27 21:37:33 +01:00
Christian Kellner
7596bdf5e2 ci: start testing on Fedora 33
Now that Fedora 33 is about to be released and support is present
in composer, start testing it.
2020-10-22 19:49:59 +02:00
Christian Kellner
be0765a992 ci: drop testing Fedora 31
osbuild composer upstream has dropped support for Fedora 31 since
this is very close to end-of-life. Since we use composer master
in our CI this change actually broke it.
2020-10-22 19:49:59 +02:00
Christian Kellner
7081f43153 ci: use s3cmd from repositories instead of pip
s3cmd does not work properly with python 3.9 (used on Fedora 33):
  Problem: <class 'AttributeError: 'xml.etree.ElementTree.Element'
            object has no attribute 'getchildren'
  S3cmd:   2.1.0
  python:  3.9.0rc1 (default, Aug 12 2020, 00:00:00)

Use the one from the official repositories, which in case of F33
has a downstream fix for the error.

See rhbz#1884607 and s3tools/s3cmd#1137

Patch based on osbuild-composer commit 1a69a891 by Ondřej Budai.
2020-10-22 19:49:59 +02:00
Lars Karlitski
938f2e0ba8 schutzbot: enable EPEL in RHEL
The osbuild-composer-tests package recently started to list its actual
dependencies, which include packages from EPEL. Enable EPEL in
deploy.sh.

Based on this patch by Ondřej Budai <obudai@redhat.com>:

  https://github.com/osbuild/osbuild-composer/pull/1022
2020-10-08 11:22:18 +02:00
Major Hayden
661e202e79 🚚 Bring over osbuild-composer CI changes
Signed-off-by: Major Hayden <major@redhat.com>
2020-09-24 15:53:17 -05:00
Major Hayden
0ee38b00d1 🤖 schutzbot: Bring over updates from o-c
Signed-off-by: Major Hayden <major@redhat.com>
2020-08-06 00:16:39 +02:00
Major Hayden
dd6981c481 Use script for telegram notification
Jenkins' declarative pipelines have interesting requirements around when
you can use traditional groovy scripting in the pipeline and some items
in `post` require special handling.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-20 16:22:21 +02:00
Ondřej Budai
cc494ec04b schutzbot: remove enabling of rcm socket unit
The whole rcm subpackage was removed in osbuild-composer's commit fbfa191.
Unfortunately, this broke osbuild's schutzbot because it tries to start
the rcm socket.

This commit removes enabling of the not-anymore-existing socket unit.
2020-07-20 08:57:27 +02:00