Commit graph

37 commits

Author SHA1 Message Date
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
Major Hayden
be2f7dc795 💣 Notify via telegram on master CI failure
We've come a long way and we need to triage failures that occur during
CI for the master branch. This will help us find problems with CI as
well as find other issues that could show up in a customer environment.

Also, let's send a happy notification when everything goes well. 💚

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-17 13:56:30 -05: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
11c1063729
Run image tests in PSI only
AWS does not have nested virtualization.
2020-06-05 13:14:30 -05:00
Major Hayden
daec7e8234 Add CI details script
Dump data about the machine running the test very early in the job run.

Signed-off-by: Major Hayden <major@redhat.com>
2020-06-05 13:11:01 -05: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
89b9e541e2
Add sudo to dnf list command
Bringing over the fix from ansible-osbuild
2020-05-22 14:04:26 -05: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
Major Hayden
05802951eb CI: Add image testing on Fedora 32
Signed-off-by: Major Hayden <major@redhat.com>
2020-05-18 09:30:39 -05:00
Major Hayden
96d3b7aa9d Bring jenkinsfile in line with osbuild-composer
Add the artifact preservation bits from the osbuild-composer jenkinsfile
and use the shared `run_tests()` function to avoid repeating ourselves.

Signed-off-by: Major Hayden <major@redhat.com>
2020-05-15 17:50:45 +02:00
Major Hayden
9f060bdc83 Enable testing on RHEL 8.2
Signed-off-by: Major Hayden <major@redhat.com>
2020-05-15 17:50:45 +02:00
Major Hayden
7e8ff16d7c CI: Use Jenkins' merged repo for testing
When Jenkins clones a repository for testing, it does the base clone
first and then merges the code from the PR afterwards. This ensures that
the code merges properly and is tested properly, but it also makes a SHA
that only exists inside Jenkins. 😢

Tell ansible-osbuild to use the repository that Jenkins made so that the
SHA is valid.

Signed-off-by: Major Hayden <major@redhat.com>
2020-05-14 09:01:45 -05:00
Major Hayden
6b9cd099f5
Quick fix: switch jenkins > schutzbot in CI
The `jenkins/` directory has been removed in `osbuild-composer`.
2020-05-13 16:36:32 -05:00
Major Hayden
b613afb168 CI: Build RPMs in a mock chroot
Tell ansible-osbuild to build osbuild/osbuild-composer RPMs in a mock
chroot and install them from there instead of building them with
Ansible.

This brings us closer to how koji and brew build RPMs.

Signed-off-by: Major Hayden <major@redhat.com>
2020-05-13 16:19:32 -05:00
Major Hayden
6e2865fc63 Test with internal Jenkins in parallel
Attempt osbuild testing on the internal Jenkins deployment with
nodes that are destroyed after each use. The internal Jenkins looks for
a Jenkinsfile inside the `schutzbot` directory.

Let's not remove the `jenkins` directory (used by jenkins.osbuild.org)
yet until we know the internal Jenkins is stable and performs well.

Signed-off-by: Major Hayden <major@redhat.com>
2020-05-12 08:09:44 +02:00