Commit graph

237 commits

Author SHA1 Message Date
Jakub Rusz
0b962c9185 ci: add slack notfications
This sends a message to a slack channel if a scheduled pipeline is
ran and reports either failure or success.
2021-07-12 11:21:01 +03:00
Achilleas Koutsou
5fe1ae41b1 schutzbot: akoutsou ssh keys 2021-07-09 09:55:40 +02:00
Xiaofeng Wang
f87ce3fa3a Update schutzbot/terraform to point to latest gitlab-ci-terraform
repo commit
2021-07-01 13:34:12 +02:00
Achilleas Koutsou
54a811c3f1 schutzbot/mockbuild.sh: RHEL 8.5 support
Add RHEL 8.5 support to the mockbuild script.
2021-06-29 17:26:43 +01:00
Xiaofeng Wang
9a7016f451 Remove the subscription check on mock config for RHEL 8.5 2021-06-29 16:14:45 +02:00
Xiaofeng Wang
e00ba2f075 gitlab-ci: Add two new RHEL 8.5 runners on rpmbuild stage
Now CI is able to build RHEL 8.5 RPM package on both x86_64 and
aarch64
2021-06-29 16:14:45 +02:00
Xiaofeng Wang
bc43eab535 Update schutzbot/terraform to point to latest gitlab-ci-terraform
repo commit

The latest gitlab-ci-terraform repo commit includes new runners:
1. openstack/rhel-8.5-x86_64
2. aws/rhel-8.5-x86_64
3. aws/rhel-8.5-aarch64
2021-06-29 16:14:45 +02:00
Ondřej Budai
419ac4c769 ci: remove EXTRA_REPO_PATH_SEGMENT
EXTRA_REPO_PATH_SEGMENT was needed when both Jenkins and Gitlab CI
were running in parallel (so they don't override their artifacts).

Jenkins is now decommissioned so we can drop the variable.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-06-29 13:58:58 +02:00
Ondřej Budai
42e4a5f6ac ci: remove fedora 34 hack from mockbuild
This is apparently not needed anymore, I checked with 20 jobs here:
https://gitlab.com/osbuild/ci/osbuild-composer/-/pipelines/328779200

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-06-29 11:53:56 +02:00
Jakub Rusz
b6c579cbe3 tests: Enable use of custom osbuild-composer repo
This enables the user to specify custom REPO_URL for use during
internal RHEL build testing as ENV in scheduled pipelines.
It also gives the option to use osbuild build specified in
Schutzfile or from the nightly build repository.
2021-06-25 15:10:40 +03:00
Jakub Rusz
905c297bc7 tests: enable nightly test execution in gitlab CI
This adds several stages to the gitlab-ci.yaml file which are
triggered by a schedule specified in Gitlab->CI/CD->Schedules
2021-06-25 15:10:40 +03:00
Jakub Rusz
beead86da6 tests: update cloud-cleaner
In 0680214c9b20b76f82c381fb3472d83846ca0c71 the BUILD_ID was changed
in azure.sh test but not in cloud_cleaner causing cloud-cleaner to
not clean up properly. This fixes that.
2021-06-25 14:20:07 +03:00
Alexander Todorov
968e7b210f CI: Store .repo file as artifacts. Fixes #1458
Note: only store them for the Base jobs b/c these files are produced
by deploy.sh and will be the same across jobs in the same pipeline.
2021-06-15 11:43:42 +03:00
Ondřej Budai
dd3099f03d ci: run centos stream 8 integration test on openstack
AWS doesn't have real KVM and it seems that booting Centos Stream image using
TCG stopped working (TCG was actually never supported on EL). Let's switch
to using OpenStack that has KVM support.

Also, I bumped the terraform repository because the older version didn't have
centos stream on OpenStack.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-06-10 11:39:05 +02:00
Alexander Todorov
8c1afdd727 CI: Remove Jenkinsfile, use GitLab instead 2021-06-04 10:48:04 +03:00
Christian Kellner
b4773caebc schutzbot: send notifications to slack
Send notifications about successful and failed builds to slack instead
of Telegram.
2021-06-02 10:16:08 +02:00
yih
661d59e534 add test case to push/pull edge container images in quay.io 2021-05-26 12:16:42 +03:00
Alexander Todorov
dedc4b9fc9 GitLab CI: User newer terraform SHA
brings in some of the missing openstack/ images definitions
2021-05-25 12:39:59 +03:00
Martin Sehnoutka
4a54ab43e5 test/cases: Introduce common "regression" test for all distros
Create an entry point for all regression test called "regression.sh" and
run it as part of the base tests for all our distros. This entry
point contains logic for running only the test cases that are
appropriate for a given distribution.
2021-05-20 13:07:07 +03:00
Jakub Rusz
8dcf859473 tests: move some integration tests to gitlab CI
This also includes several modifications to tests scripts to
enable them running in gitlab CI.
2021-05-12 15:38:30 +03:00
Jakub Rusz
e613b2456b tests: modify DISTRO_CODE usage
Set DISTRO_CODE if unset for gitlab CI
2021-05-12 15:38:30 +03:00
Alexander Todorov
57cebbfaea tests: Define COMPOSE_URL/COMPOSE_ID in a single place. Fix #1397
we don't want this defined multiple times in different places
2021-05-12 09:26:31 +02:00
Martin Sehnoutka
98dd7d7737 rhel84: remove excluded package if explicitly specified in the bp
When a users wants to install a package that itself is excluded or its
dependency is excluded, it fails the build. There is no known workaround
for this shorcoming of our current design.

Therefore, remove a package from the list of excluded if it is
explicitly mentioned in a blueprint. This will not solve the issue with
dependencies, but it will create a possibility of a workaround.

Also, introduce regression test to verify the bug fix and hook it into
CentOS CI (this issue was reported against RHEL, but CentOS runs on AWS
so it is better to verify the fix there).
2021-05-07 09:26:52 +02:00
Jakub Rusz
06361267d5 Add image boot testing in Azure
This uses an image created and uploaded to Azure using composer-cli
and then terraform to spin up a linux vm from that image, check
if the machine works and then cleans up everything.
2021-05-05 12:05:32 +03:00
Ondřej Budai
cf73edd2d2 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.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-15 14:39:09 +02:00
Ondřej Budai
260fdb053f ci: add GitLab CI
This commit adds an experimental GitLab-based CI. See the PR for more
information.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-14 09:18:06 +02:00
Ondřej Budai
8f91e236f8 ci/deploy: add fallback variable for GitLab
GitLab CI doesn't use GIT_COMMIT, therefore it's needed to have a fallback
to CI_COMMIT_SHA.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-14 09:18:06 +02:00
Ondřej Budai
d28c41b844 test: subscribe only RHEL instances
GitLab CI passes secrets to all jobs. Thus, we need to make sure that
only RHEL is being subscribed.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-14 09:18:06 +02:00
Ondřej Budai
5fd2ad2337 mockbuild: allow inserting an extra path segment
GitLab CI builds its own rpms and thus it must be use a different path.
This commit modifies mockbuild.sh and deploy.sh to be able to add an
extra path segment into the path so GitLab can use a different path.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-14 09:18:06 +02:00
Ondřej Budai
f977a3703b schutzbot: do not run the nightly test for the EL9 integration test
This was probably forgotten in the original commit that add EL9 tests.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-02 09:51:16 +02:00
Ondřej Budai
22957bf963 schutzbot: disable nightly testing on main
See the added comment.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-02 09:51:16 +02:00
Alexander Todorov
4c3a30f035 tests: Don't execute image tests on PRs. Closes #962
- image_tests.sh is already being executed from the osbuild
  repository by installing osbuild-composer-tests & calling the
  script directly
- in this repo we've got distro_test.go::TestDistro_Manifest() and
  distro_test_common.TestDistro_Manifest() which compare the static
  manifests stored in this repository with the ones generated
  dynamically by the code base. This is executed via `go test` and
  runs against all available json files.

The above two items cover the part where we want to make sure that
the resulting content is what we expect.

Additionally the existing integration tests cover the part where
we build images, upload them to a cloud vendor and boot a new VM
from the image.
2021-03-31 09:34:41 +03:00
Jozef Mikovic
165ecafeb2 test: use DISTRO_CODE to select tests case
Using DISTRO_CODE simplifies test case selection and allows to test
different distro than the one test is running on.
This is used to run tests for RHEL 9.0 on F33 or RHEL 8.4
2021-03-26 14:05:20 +00:00
Jozef Mikovic
a9e8ea2a21 distro/rhel90: add RHEL9 support
osbuild-composer can now build rhel 9.0 images.
Added support is limited to qcow2 image type.
2021-03-26 14:05:20 +00:00
Ondřej Budai
9eb2268ffe test/nightly: fix the repository json
Trailing commas are a big no-no for json.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-23 09:25:20 +00:00
Aleksandar Todorov
c2dc9d65fb tests: Enable RT repository for nightly test jobs 2021-03-22 15:12:23 +01:00
Xiaofeng Wang
5445acb0cc test: Update ostree-ng to support container and installer tests
The ostree-ng will only be run on RHEL 8.4 because
rhel-edge-container and rhel-edge-installer image type are
supported by RHEL 8.4 only
2021-03-17 18:12:17 +00:00
Ondřej Budai
a6bc07fac0 schutzbot: run the CS8 integration test on AWS
I think there's currently no reason to run it on PSI.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-16 12:07:55 +01:00
Aleksandar Todorov
2bcd040b4a schutzbot: Fix wrong COMPOSE_ID URL 2021-03-16 09:10:38 +01:00
Ondřej Budai
d6afdda82f schutzbot: evaluate the when block before an agent is started
By default, a when block is evaluated after an agent is started. I discovered
this randomly: I opened a pipeline and saw that it was stuck on "Prepare EL8
internal 🤔" stage even though the pipeline should have even run it.

This commit fixes it by adding "beforeAgent true" to all when blocks. It
changes the behaviour to more sane "if when is true, allocate an agent".

See https://www.jenkins.io/doc/book/pipeline/syntax/#evaluating-when-before-entering-agent-in-a-stage

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-15 17:58:51 +00:00
Tomas Hozza
aa1d038b59 cloud-cleaner: clean up image and vm after GCP integration test
Extend internal GCP library to allow deleting Compute Node image and
instance. In addition provide function to load service account
credentials file content from the environment.

Change names used for GCP image and instance in `api.sh` integration
test to make them predictable. This is important, so that cloud-cleaner
can identify potentially left over resources and clean them up. Use the
same approach for generating predictable, but run-specific, test ID as
in GenerateCIArtifactName() from internal/test/helpers.go. Use SHA224
to generate a hash from the string, because it can contain characters
not allowed by GCP for resource name (specifically "_" e.g. in "x86_64").
SHA-224 was picked because it generates short enough output and it is
future proof for use in RHEL (unlike MD5 or SHA-1).

Refactor cloud-cleaner to clean up GCP resources and also to run cleanup
for each cloud in a separate goroutine.

Modify run_cloud_cleaner.sh to be able to run in environment in which
AZURE_CREDS is not defined.

Always run cloud-cleaner after integration tests for rhel8, rhel84 and
cs8, which test GCP.

Define DISTRO_CODE for each integration testing stage in Jenkinsfile.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-03-15 16:48:40 +00:00
Aleksandar Todorov
0716c32e97 tests: Refresh COMPOSE_ID file if COMPOSE_URL was defined from ENV 2021-03-15 14:20:25 +02:00
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
6c546fa257 Schutzbot: Start building & testing on aarch64 for RHEL/CentOS
For now we're testing only on released streams in AWS because
we don't have aarch64 support in PSI.
2021-03-12 11:59:21 +00:00
Aleksandar Todorov
b5a1d89e45 tests: Save osbuild-composer.repo file under artifacts
makes it easier to grab if we need it for manual testing or
in case one needs to download the RPMs from Schutzbot
2021-03-11 11:01:20 +02:00
Ondřej Budai
ec7783324c test/azure: use eastus location
We use this location on Image Builder, let's also use it here to catch issues.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-08 18:22:27 +01:00
Aleksandar Todorov
b1fc31060f Don't check branch name when deciding if build was started by cron
because we already have cron jobs on multiple branches!
2021-03-08 12:22:26 +02:00
Tom Gundersen
c7adc9128a Schutzbot: don't block on container build
Move the container build to the same phase as the RPM builds. This does not make a huge difference, but should
shave off about two minutes of total CI runtime.
2021-03-07 11:09:00 +01:00
Tom Gundersen
cc80957d1e schutzbot/integration/el8: add azure creds
This was left out from the EL8 test case, include the
same creds as in the other cases.
2021-03-06 15:40:48 +00:00
Ondřej Budai
fa9fc890c9 test: add integration test for the azure upload
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-06 15:40:48 +00:00