Commit graph

311 commits

Author SHA1 Message Date
Christian Kellner
e099b8a96e run-tests: explicitly specify --cached
Seems to be required for newer versions of `git`.
2022-01-26 18:02:33 +01:00
Christian Kellner
1a5977bad2 builder: move ssl arguments to global options
When the builder is used as a command line argument: move the
ssl related options to the global parser so they can be used
with status and wait too.
2022-01-26 18:02:33 +01:00
Christian Kellner
2ca0f3b370 builder: make repo a proper optional argument
When the builder is used as an command line binary: have `repo`
be a proper command line argument. It was currently specified
before arch which can be passed multiple times, but so does
repo; hence one of them needs to be optional.
2022-01-26 18:02:33 +01:00
Christian Kellner
9c5f38fc35 builder: small whitespace fix
Two lines before the first class. Will make auto-format happy;
and David.
2022-01-24 23:21:31 +01:00
Christian Kellner
5f16fb1e31 devcontainer: include openssl
Needed for certificate generation.
2022-01-24 23:21:31 +01:00
Christian Kellner
f4576cb255 builder: fix command line argument names
Fix the names for various command line arguments for when the
builder plugin is invoked as a stand-alone executable.
2022-01-24 23:21:31 +01:00
Christian Kellner
bbf8b74047 pylint: move config to setup.cfg
This is what we do in osbuild, lets do it here too, so we are in
sync about where the configuration is.
2022-01-24 23:21:31 +01:00
Christian Kellner
07b376e02f test: run-test.sh now works inside a container
The `run-test.sh` helper is meant to execute the tests as if it
was CI but using a container. If it is detected that we are
already running inside a container assume it is prepare so that
we can exectue the tests directly and do so.
2022-01-19 20:45:23 +01:00
Christian Kellner
a841845688 devcontainer: initial import
Add support for Visual Studio Code Dev Containers.
2022-01-19 20:45:23 +01: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
Alexander Todorov
16905e3c5f CI: Fix failure in Coverity Scan 2021-11-22 11:47:18 +01:00
Alexander Todorov
6dbc41dbdb ci: Enable Coverity Scan 2021-11-15 12:29:17 +00: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
dependabot[bot]
98c4c90637 build(deps): bump ludeeus/action-shellcheck from 0.5.0 to 1.1.0
Bumps [ludeeus/action-shellcheck](https://github.com/ludeeus/action-shellcheck) from 0.5.0 to 1.1.0.
- [Release notes](https://github.com/ludeeus/action-shellcheck/releases)
- [Commits](https://github.com/ludeeus/action-shellcheck/compare/0.5.0...1.1.0)

---
updated-dependencies:
- dependency-name: ludeeus/action-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-06 15:08:36 +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
Christian Kellner
a6cb711e1c test: use importlib instead of imp
Replace the usage of `imp` with `importlib` because the former
is deprecated and newer pylint will complain and break CI.
2021-10-05 12:18:46 +02:00
Alexander Todorov
98142d3325 Trigger CI jobs only for PRs and main
to minimize the resource usage when we & Dependabot push to branches
2021-10-05 11:08:25 +02:00
Alexander Todorov
17dd9582c8 Enable Dependabot 2021-10-05 11:08:25 +02:00
Christian Kellner
2b324d3d89 plugin/cli: remove type annotation
Remove the single string type annotation; it does not gain us much and
seems to be the only thing missing for python 2.7 (RHEL 7) support.
2021-08-17 02:28:07 +02:00
Alexander Todorov
f569c38ea9 Add support for GitLab CI
and remove Jenkins related files
2021-07-29 11:19:33 +02:00
Alexander Todorov
e778771f2b Remove rhel.repo to avoid dnf being confused
when building the containers the initial `dnf upgrade` will download
content from the latest nightly trees which turns the container into a
Beta system and subsequent `dnf isntall` gets confused!
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
3ceeb47333 tests: change all mentions of Fedora 32 to Fedora 33
Fedora 32 is EOL, let's use Fedora 33. (Fedora 34 is not yet
100% supported in composer).
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
Christian Kellner
345265e9d2 test/builder: check manifest fetching
Add a test that checks that manifests are indeed uploaded and
another test that simulates a failure while fetching manifests.
2021-02-25 16:01:51 +01:00
Christian Kellner
efc648f32a builder: fetch manifests for the compose
Add support for fetching manifests via the compose/<id>/manifests
API endpoint. A failure to fetch them is not critical, since it is
possible the manifests don't exist, e.g. when depsolving fails.
The manifest is attached per image request.
2021-02-25 16:01:51 +01:00
Christian Kellner
db6d4645df gitignore: ignore vscode files
IDE related files; ignore them.
2021-02-25 16:01:51 +01: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
0bcac397a3 test: remove the podman-plugins workaround
Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1877865 is now shipped in
8.3.
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
4fdc457745 test/integration: define podman network gateway manually
Podman 2.2.0 doesn't create a gateway by default. See:
https://github.com/containers/podman/issues/8748

This commits introduces a workaround: specifying the gateway manually.

Note that the gateway is used in test/run-builder.sh
2020-12-16 15:32:28 +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
4603578b62 test/integration.sh: install podman-plugins from RPMRepo
The nightly disappeared again. We now have an 8.4.0 snapshot that contains
the package. Let's use it.
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
d9cb6217ef test/integration.sh: bump nightly
The current one is not available anymore. We cannot use rpmrepo for this
yet, because the podman-plugins package is too new.
2020-12-01 10:48:08 +01:00
Christian Kellner
c282b9b1f0 test: replace docker.io with fedora's registry
In order to avoid running into docker.io's new download limit,
use the container directly from registry.fedoraproject.org.
2020-11-22 23:53:38 +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