Commit graph

41 commits

Author SHA1 Message Date
Aleksandar Todorov
661b2a0be0 Schutzbot: Allow overriding internal RHEL URL
by defining the COMPOSE_URL environment variable! This will allow
testing more flavors of internal releases.

The rest is renaming files and variables to reflect the fact that
we're running tests against internal trees, not only nightlies.
2021-03-12 20:38:06 +02:00
Aleksandar Todorov
4787fce3b7 Unstash rhel8nightly repo & json files
- even if they don't exist sometimes but ignore the errors
- make the nightly repository with a higher priority
- override rhel-8*.json files so that newly built images will
  also consume the nightly content
2021-02-12 14:22:04 +01:00
Ondřej Budai
d423007482 tests: move the epel dependencies to provisioning
koji and ansible are not in RHEL repositories. Depending on them breaks RHEL
gating (see OSCI-1541): It tries to build a custom image with -tests package
in it but in the build environment there's no EPEL.

This commit makes the RPM independent from EPEL. However, we still need koji
and ansible, so the provision script now enables EPEL and installs the packages
from there. This is not nice but we have to live with that until OSCI-1541 is
solved.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2020-12-18 09:04:38 +01:00
Ondřej Budai
a1b730d536 tests: pre-install EPEL for koji-osbuild rev dep test on RHEL
koji-osbuild-tests depends on koji which is not available in RHEL. As we need
to get rid of EPEL from deploy.sh (see the following commit), we need a
mechanism to preinstall EPEL before koji-osbuild-tests is installed. This
commit introduces pre_install_packages to Schutzfile - a simple way to
install packages before ${PROJECT}-tests is installed.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2020-12-18 09:04:38 +01:00
Lars Karlitski
bbaffa33c9 Schutzfile: add koji-osbuild as dependant
Generalize deploy.sh to allow setting up reverse dependency tests. Those
need the same setup for osbuild and osbuild-composer (i.e., the ones
under test), and in addition need the -tests package of the dependant
project.

Add test runs for koji-osbuild for all operating systems in Jenkinsfile.

Use a commit in koji-osbuild for which a repository was pushed to s3 in
the right format.
2020-11-23 14:40:25 +01:00
Lars Karlitski
7ce44b6b72 schutzbot/deploy.sh: pull setup_repo into function
heredocs make control flow hard to read. Pull writing the repo file into
its own function and use it for setting up osbuild and osbuild-composer
repos.
2020-11-23 14:40:25 +01:00
Tom Gundersen
64432c706a schutzbot/mockbuild: test against osbuild in target release by default
To make sure we test against what we will release with, use osbuild from
the target distro rather than rebuilding it.

The only exception is in RHEL8.3, where we are not rebasing any longer,
but expect users who use new osbulid-composer from upstream to use it
with new osbuild from upstream too. In this case, use the RPM from
osbuild upstream, for now pinned to the same version as was in the
submodule.

This introduces a new configuration file: Schutzfile, which is meant
to contain the full test-matrix. For now it only points to the upstream
osbuild commit to add to the distro we are testing against (only relevant
for 8.3).

The submodule is now unused and is therefore removed. The produced repos
now only contain osbuild-composer, osbuild is never built as part of
osbuild-composer CI.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-11-15 14:25:50 +01:00
Lars Karlitski
4bd891be9e 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-12 09:41:36 +01:00
Tom Gundersen
ff70b269fb schutzbot: move repository snapshot definitions to the -test package
The test package should be self-contained and contain all the configuration
necessary for a known-good test run (minus secrets). This moves repo
overrides from the test orchestration into the test package.

We want all the external sources (including boot isos and repositories) to
be pinned by their content hash, and never use anything that is not strictly
defined. This moves us in the right direction, but we still have some tests
to update to use these shipped repos rather than official mirrors.

One remaining challenge is that we must make sure all our test runners have
access to the RHEL snapshots, which is not currently the case for the runners
in EC2, but a solution is in the works.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-10-23 11:33:04 +02:00
Tom Gundersen
931bd8be57 test: provision test machine from tests
Don't rely on the deployment script to install the right config or to start the
services.

This further disentangles the tests from schutzbot.
2020-10-21 09:04:13 +02:00
Tom Gundersen
d7247e2878 schutzbot/deploy: drop journald work-around
The bug this is meant to fix is not referenced atdn not explained in
comments/commit. Drop it in an effort to find out if it still applies.
2020-10-21 09:04:13 +02:00
Tom Gundersen
5fd1d3c4a2 schutzbot/deploy: re-enable weak deps
Don't differ from defaults just for the sake of speed. We still keep
the fastestmirror option enabled as that does not affect the resulting
install.
2020-10-21 09:04:13 +02:00
Tom Gundersen
1a1ecbeadb schutzbot/deploy: re-enable modular repos
We don't want to differ from standard installs unless we have to. We
prefer tests that are closer to standard installs over faster tests.
2020-10-21 09:04:13 +02:00
Tom Gundersen
25abccf66d tree-wide: drop f31 support
We no longer release into F31, and the right specfile was anyway not
being tested.

This allows us to remove a workaround that updates the VMs during
deploy, and other fedora-31 specific hacks.
2020-10-21 09:04:13 +02:00
Lars Karlitski
8161f2fa04 schutzbot: add repositories to be used by tests
Base these on https://osbuild.org/rpmrepo.

Install those repository files when deploying in schutzbot and include
them in tools/deploy/test for local testing.

Also remove copying overrides from deploy.sh, because it copied the
wrong files. We probably want to add this back properly in the future.
2020-10-16 09:37:04 +02:00
Ondřej Budai
6a1b9f17ce test: enable epel on RHEL
I broke master by merging #1021 - ansible and koji are not in the official
RHEL repositories so we need to enable epel on RHEL to be able to get them.
2020-10-07 17:17:43 +01:00
Tom Gundersen
9e56ac9a8b schutzbot: split provision out from deploy
Deployment is specific to CI, but the provision script is needed to be
run to execute tests locally too.

This should be called from each test, rather than from deploy. For now
this change is a noop.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-10-06 13:08:26 +02:00
Tom Gundersen
805ae59151 tests: ship all tests in the -tests sub-package
No tests should be run directly from git, but should rather be installed
onto the test system using rpm and run from there. This moves towards
unifying our two types of test cases.

The new structure of is now:

`test/cmd`:   the executors, one for each test-case. This is installed
              into `/usr/libexec/test/osbuild-composer`.
`test/data`:  data and config used by the tests. This is installed into
              `/usr/share/tests/osbuild-composer`.
`schutzbot`:  configuration of the actual test run. In particular, this
              is where the distros and repositories to test against are
              configured.

This is very much still work-in-progress, and is only the first step
towards simplifying schutzbot. Apart from moving files around, this
should be a noop.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-10-06 13:08:26 +02:00
Tom Gundersen
e835c34678 test/integration: move composer configuration into composer
This is not an integration test, but configuration.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-10-06 13:08:26 +02:00
Tom Gundersen
272332e5e8 test: rename image-tests to integration
We already have something called image-tests, so this naming was
confusing. This is a collection of generic integration tests, so name
them accordingly.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-10-06 13:08:26 +02:00
Tom Gundersen
c7d993d537 scutzbot: deploy pre-generated SSL certs for testing 2020-10-06 13:08:26 +02:00
Alexander Todorov
fd311fedfd tests: Start osbuild-composer-koji.socket only if installed 2020-09-29 09:00:44 +02:00
Ondřej Budai
28aff2259a schutzbot: start also the remote socket
The following commits will add testing of authentication on this socket.

This commit also sets up the config for composer other it won't start
with remote socket enabled.
2020-09-23 11:08:21 +01:00
Ondřej Budai
e296a3dea7 schutzbot: greenprintify deploy.sh
It's a word, trust me.
2020-09-23 11:08:21 +01:00
sanne raymaekers
9ca50ae3ac osbuild-composer-cloud: introduce the cloud-specific service 2020-09-22 11:38:28 +02:00
Martin Sehnoutka
d9f254f9d1 *.sh: apply fixes suggested by shellcheck
also:
tweak some automatic fixes to be more readable
fix automatically generated bash fixes for SSH options
2020-09-19 15:10:39 +02:00
Martin Sehnoutka
b06e6dd916 *.sh: apply automatically all suggestions from shellcheck
This commit was automatically generated using:
```
$ fd --exclude vendor sh | xargs shellcheck -f diff | git apply
```
2020-09-19 15:10:39 +02:00
Tom Gundersen
9666be2891 schutzbot: add koji integration tests
This sets up containers running koji and supporting infrastructure, and
calls the osbuild-composer-koji API to build and image and push it into
our testing instance.

koji-compose.py and various fixes by Christian Kellner.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-09-16 00:15:02 +01:00
Alexander Todorov
951e5e66b6 Shutzbot: add pipeline for RHEL nightly builds. Refs #912
Notes:
ATM will not run any actual tests b/c we want to make sure the
pipeline configuration is correct.

run_tests() will call the deploy.sh script and then do nothing
b/c of the "dummy-" prefix which doesn't match any actual tests!
2020-09-04 09:56:25 -05:00
Alexander Todorov
c0d9bb13fc Shutzbot: show info for osbuild-composer sources
so we can actually see what sources are being used
2020-09-04 09:56:25 -05:00
Tom Gundersen
dc5434d627 schutzbot/deploy: do not override repos when deploying on 8.2
We will automatically detect whether to use GA or Beta content, so we
can drop the override as 8.2 is GA so will get GA content.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-08-19 15:06:21 +02:00
Tom Gundersen
fbfa191c81 rcm: drop sub-package
The osbuild-composer-rcm package was never finished, not in use and will be replaced by osbulid-composer-koji.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-07-17 19:13:15 +01:00
Major Hayden
db5fb9908a Do RHN registration in deploy + mockbuild
Check to see if the instance is registered prior to attempting
registration. Also, ensure that registration happens during mock build
and during the deployment.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-13 11:19:07 -05:00
Major Hayden
dac085d035 🛃 Ensure the correct packages are installed
Some dnf bugs existed in early releases of Fedora 31 + 32 around
repository priorities being ignored (like BZ 1733582. Ensure that we are
running the latest version of dnf before we try to install from the mock
build repo (which has a much higher priority than Fedora's default
repos).

Also, check to see if EPEL is installed already before installing it
again.

Fixes #824. 🥰

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-09 08:53:23 -05:00
Major Hayden
e88b9c4bd7 🛑 Stop using internal repositories
Remove the F31/F32 internal repositories since they are causing dnf
download errors from time to time.

The 8.2 repository override should have never been there in the first
place since we're using the CDN.

The 8.3 repository is no longer needed since we can register the RHEL
8.3 instances against the staging CDN and get beta content from there.

Fixes #822.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-09 08:53:23 -05:00
Major Hayden
edb30c5d21 🚤 Enable fastestmirror for all distros
RHEL can benefit from `fastestmirror` when it downloads metadata and
packages from the EPEL repository.

Fixes #817.

Signed-off-by: Major Hayden <major@redhat.com>
2020-07-06 19:45:10 +02:00
Tom Gundersen
fe9f2c55b8 repositories/rhel-8: default to beta repos
The next release we are targeting is RHEL 8.3 Beta, switch the
repositories over.

In the future, we should distinguish between beta and non-beta based on
/etc/os-release so we don't have to hard-code this upstream.

The beta repositories are not actually available yet, so in our tests,
we have to override this again to point at the GA ones (currently 8.2).

Needless to say, this situation leaves much to be desired.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-06-29 16:04:38 +02:00
Alexander Todorov
5bf3af559f Shutzbot: install only osbuild-composer-tests
in order to catch missing dependencies
2020-06-24 15:14:47 +02:00
Major Hayden
bfad57bf7b CI: Retry osbuild-composer-tests installation
Reduce CI failures by trying to install osbuild-composer-tests five
times.

Fixes #784

Signed-off-by: Major Hayden <major@redhat.com>
2020-06-23 16:19:20 +02:00
Major Hayden
4ca535c673 Add RHEL 8.3 repository override
Override the repository for RHEL 8.3 since they can't be registered yet.

Signed-off-by: Major Hayden <major@redhat.com>
2020-06-12 09:59:25 +02:00
Major Hayden
89117ebf3a Deploy quickly in CI without Ansible
Speed up the deployment during CI runs and avoid the need for lots of
extra packages to run Ansible. This gets us closer to running bare
images for each distro that better simulates a customer environment.

Signed-off-by: Major Hayden <major@redhat.com>
2020-06-11 15:58:30 -05:00