Commit graph

32 commits

Author SHA1 Message Date
Ondřej Budai
b02dc8a7ab mockbuild: rotate a variable name
The previous one is no longer defined.
2021-10-21 17:48:08 +02:00
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
Ondřej Budai
124cda90e2 mockbuild: add rhel 9 2021-07-22 17:58:41 +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
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
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
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
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
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
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
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
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
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
1a7f286578 ⚙ Bring over CI improvements from osbuild-composer
Signed-off-by: Major Hayden <major@redhat.com>
2020-07-14 13:05:18 +02:00
Major Hayden
381abb354a Use S3 for CI repositories
Upload artifacts from the mock builds into S3 to allow us to burst into
AWS when needed.

Signed-off-by: Major Hayden <major@redhat.com>
2020-06-05 09:43:09 -05:00
Major Hayden
e7b480895f CI: Store RPMs by SHA
This commit brings over updates for mock builds from osbuild-composer.

Signed-off-by: Major Hayden <major@redhat.com>
2020-06-01 15:54:50 +02:00
Major Hayden
73429035bc CI: Use RHEL 8 CDN image
Now that we have a fully subscribed RHEL 8 image, let's use that instead
of RHEL 8.2 nightlies.

Signed-off-by: Major Hayden <major@redhat.com>
2020-05-28 07:00:00 +02:00
Major Hayden
d8c43bc0e7 Build in a mock chroot first
Build the RPMs in a mock using a simple script so that ansible-osbuild
can focus fully on deployment rather than compiling RPMs.

Signed-off-by: Major Hayden <major@redhat.com>
2020-05-22 10:41:10 +02:00