Commit graph

418 commits

Author SHA1 Message Date
Major Hayden
eca999be4a
Add sudo to dnf list command
Bringing over the fix from ansible-osbuild
2020-05-22 14:03:46 -05:00
Major Hayden
1e29ab291e CI: Add mock builds for RHEL 8.3
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>
2020-05-21 08:56:53 -05:00
Major Hayden
d92a742f28 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-20 23:11:16 +02:00
Major Hayden
62f61d34c2 CI: Skip AWS test if bucket missing
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>
2020-05-20 14:01:00 -05:00
Major Hayden
63c59b2ca1 CI: Run EC2 tests for all instances
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>
2020-05-20 12:01:38 -05:00
Lars Karlitski
e4df938152 schutzbot: remove all timeouts except the global one
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
2020-05-20 07:21:13 -05:00
Major Hayden
d4b7c1d0c7 CI: Test EC2 import and boot
Build an AWS AMI image, upload it to S3, import it into EC2, and boot
it.

Signed-off-by: Major Hayden <major@redhat.com>
2020-05-18 10:27:24 -05:00
Major Hayden
d1a0d04b92 Add three hour timeout to test pipelines
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>
2020-05-18 08:51:44 -05:00
Ondřej Budai
32c7a90464 schutzbot: add missing image tests
openstack and ami images weren't built by Schutzbot. This commit fixes it.
2020-05-15 18:47:54 +02:00
Major Hayden
efed778006 Add RHEL 8.2 testing
Run the base and image tests on RHEL 8.2. 🚂

Signed-off-by: Major Hayden <major@redhat.com>
2020-05-15 08:57:17 -05:00
Major Hayden
e8429fc3ed CI: Gather log artifacts
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>
2020-05-14 11:54:14 -05:00
Major Hayden
f36a5bbb0b 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:10:20 -05:00
Major Hayden
4aeb6f2b28 CI: Split image tests into separate tasks
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>
2020-05-14 00:32:34 +02:00
Major Hayden
6fcd994807 CI: Build RPMs using mock
Signed-off-by: Major Hayden <major@redhat.com>
2020-05-13 15:57:04 -05:00
Lars Karlitski
6c611b4875 schutzbot: use -test.timeout argument
Use golang's `test.timeout` to set the timeout instead of using
ansible's `async` property. The latter doesn't respect `register` when
running into a timeout, which means there are no logs in that case.
2020-05-12 15:40:42 -05:00
Major Hayden
3a961da7a5 Mount /tmp as tmpfs each time
Signed-off-by: Major Hayden <major@redhat.com>
2020-05-12 07:48:25 -05:00
Major Hayden
1bccedf480 Remove Fedora modular repos before testing
Signed-off-by: Major Hayden <major@redhat.com>
2020-05-12 07:48:25 -05:00
Major Hayden
fcd351f085 ↔ Parallel testing on internal Jenkins
Attempt osbuild-composer 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 07:48:25 -05:00