As we embark on a CI journey to other architectures, we need to be
explicit about choosing the right architecture for each CI node.
This is a portion of the work required for #834.
Signed-off-by: Major Hayden <major@redhat.com>
Now that RHEL 8.3 pulls from the beta CDN, let's stop hiding the errors
and allow them to make the pipeline fail.
Signed-off-by: Major Hayden <major@redhat.com>
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>
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>
Sometimes dnf has issues downloading RPMs or downloading the repo XML
and this breaks the mock build. Try to run the mock builds three times
before giving up.
Signed-off-by: Major Hayden <major@redhat.com>
Now that we have minimal images built by osbuild-compsoer for CI, let's
use those for RHEL mock builds.
This PR depends on osbuild/osbuild-composer#808 to merge first.
Signed-off-by: Major Hayden <major@redhat.com>
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>
We need to wait for cloud-init to be completely finished since it is
registering RHEL instances with RHN and preparing a swap file.
Signed-off-by: Major Hayden <major@redhat.com>
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>
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>
On RHEL, `VERSION_ID` shows up as `8.2` or `8.3`, but we need it to be
just `8`.
Remove the period and everything after it in `$VERSION_ID`.
Signed-off-by: Major Hayden <major@redhat.com>
Now that mock builds for RHEL 8.3 look good, add tests for RHEL 8.3
nightly builds. The tests are wrapped in `catchError()` which allows us
to fail the stage without failing the whole pipeline just because RHEL
8.3 is having a bad day.
Signed-off-by: Major Hayden <major@redhat.com>
Ansible configuration can be managed by an `ansible.cfg` ini file, but
setting up that file and ensuring it's always in the same place is
difficult.
Configure Ansible via environment variables instead.
Signed-off-by: Major Hayden <major@redhat.com>
Add an end-to-end qcow2 test that follows a customer's steps with
`composer-cli`. The image is booted with libvirt to allow the best
virtualization options to be chosen by libvirt. It also uses libvirt's
default network.
Signed-off-by: Major Hayden <major@redhat.com>
The `osbuild-image-tests` code does a good job testing image builds for
AWS, but it doesn't use the same code paths that a customer would when
using `composer-cli`.
Add a test that builds a compose and uploads the image using
osbuild-composer and its worker. Also, build an instance in AWS based on
the image we imported and check to see if the smoke test file is
present.
Signed-off-by: Major Hayden <major@redhat.com>
This is a very minimal image type, which is not expected to do anything
with an empty blueprint. It is documented as a way to install RHEL for
Satellite.
This fixes#720.
Signed-off-by: Tom Gundersen <teg@jklm.no>
Store RPMs in object storage based on their SHA rather than the Jenkins
build ID. This allows tests to be re-run without repeating the mock
build step.
Signed-off-by: Major Hayden <major@redhat.com>
Replace RHEL 8.2 nightly images with a RHEL 8 CDN subscribed instance so
we can test with the exact content a customer would have.
Signed-off-by: Major Hayden <major@redhat.com>
We do not properly test, and do not have properly defined use-cases for
the ext4-filesystem, partitioned-disk, nor tar image types. Drop them to
focus on delivering the things we car properly test.
Signed-off-by: Tom Gundersen <teg@jklm.no>
Now that mock building seems to be stable, let's start building RPMs for
RHEL 8.3 so we can onboard it for base/image testing soon.
Signed-off-by: Major Hayden <major@redhat.com>
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>
The osbuild CI uses the osbuild-composer CI testing playbooks but
there's no need to run the EC2 import for osbuild's CI. Add a check in
the Ansible playbook to look for the AWS_BUCKET environment variable and
skip the EC2 import if the bucker variable is missing.
Signed-off-by: Major Hayden <major@redhat.com>
Now that EC2 image testing is working well for Fedora 32, enable it for
all of the distros. Also, make it less special and allow it to run with
the other image tests.
Remove the `ami-boot` test from the list of regular image test cases
since it will be thoroughly tested via an import into AWS.
Signed-off-by: Major Hayden <major@redhat.com>
When we ran into these timeouts, they were always false negatives. It is
hard to find right values for them.
If someone does introduce a bug that hangs one of the tests, we still
have the global timeout.
Fixes#648
If a pipeline runs for three hours, stop the pipeline. This can happen
if a network connection breaks down or if jenkins loses control of one
of its agents due to infrastructure issues.
Signed-off-by: Major Hayden <major@redhat.com>
Ensure that logs are artifacted after a test run. Also, ensure that
these logs are in unique directories so that they are not overwritten by
Jenkins as it builds the final artifact archive.
For example, if two jobs have a `test.log`, Jenkis will only keep one of
those logs. Each log must be named differently or placed in a unique
directory.
Signed-off-by: Major Hayden <major@redhat.com>
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>
Make it easier to see progress in Jenkins for image tests and keep their
logs separated for easier diagnosis of problems.
Signed-off-by: Major Hayden <major@redhat.com>