Commit graph

136 commits

Author SHA1 Message Date
Ygal Blum
8407c97d96 Upload to HTTPS S3 - Support self signed certificate
API
---
Allow the user to pass the CA public certification or skip the verification

AWSCloud
--------
Restore the old version of newAwsFromCreds for access to AWS
Create a new method newAwsFromCredsWithEndpoint for Generic S3 which sets the endpoint and optionally overrides the CA Bundle or skips the SSL certificate verification

jobimpl-osbuild
---------------
Update with the new parameters

osbuild-upload-generic-s3
-------------------------
Add ca-bunlde and skip-ssl-verification flags

tests
-----
Split the tests into http, https with certificate and https skip certificate check
Create a new base test for S3 over HTTPS for secure and insecure
Move the generic S3 test to tools to reuse for secure and insecure connections
All S3 tests now use the aws cli tool
Update the libvirt test to be able to download over HTTPS
Update the RPM spec

Kill container with sudo
2022-05-26 13:46:00 +03:00
Achilleas Koutsou
56a7059b40 gitlab: limit old-worker-new-composer to 8.5 GA
The test script stops if it's not running on GA, so let's not deploy the
rest of the machines anyway.
2022-05-19 20:03:24 +02:00
Jakub Rusz
f0f0873d6e ci: run all scripts in after_script regarless of failure
We want to run all of the scripts in after_script even if some of them
fail. In aws we have rhui repos in the images and we don't use them on
GA RHEL so ci_details.sh fails there and cloud_cleaner does not run.
2022-05-17 11:20:57 +02:00
Jakub Rusz
ef87c917d5 Nightly testing: remove edge testing from nightly pipelines
All of the edge tests are being ran on every nightly compose inside
virt-qe Jenkins so no need to run all of them here as well. Keep just
ostree-raw-image.sh to cover edge testing for sign-off.
2022-05-10 14:13:24 +02:00
Xiaofeng Wang
0af53e4cad test: Add fedora-iot-container and fedora-iot-installer tests 2022-05-09 12:25:21 +02:00
Ondřej Budai
45ab577733 gitlab: fix nightly testing
f21e5fd1c9 made nightly reporting jobs not
downloading any artifacts. Unfortunately, this broke the reporting because it
depends on COMPOSE_ID and COMPOSER_NVR artifacts. Let's revert the change for
these jobs until we find a better solution.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-04-20 13:41:56 +02:00
Tomas Hozza
ee285e5e8a Weldr: support GCP upload target
Add support for importing the GCE image into GCP using Weldr API. The
credentials to be used can be specified in the upload settings and will
be then used by the worker to authenticate with GCP.

The GCP target credentials are passed to Weldr API as base64 encoded
content of the GCP credentials JSON file. The reason is that the JSON
file contains many values and its format could change in the future.
This way, the Weldr API does not rely on the credentials file content
format in any way.

Add a new test case for the GCP upload via Weldr and run it in CI.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-04-14 19:07:31 +01:00
Jakub Rusz
f21e5fd1c9 ci: do not download artifacts in finish stages
The jobs in finish stage are only meant to report the overall status of
the pipeline, they do not require to download the hundreds of artifacts
from the previous stages.
2022-04-13 10:34:58 +02:00
Jakub Rusz
9c3e9ff616 ci: add team ssh keys in before_script
Add the keys in before_script to make also rpbuild runners accessible as
the deploy.sh script is not being ran there.
2022-04-12 13:13:50 +02:00
Alexander Todorov
8556a844e8 Add tests for blueprints without explicit definition for /
- currently disabled on Fedora until PR #2461 lands

Related: RHBZ#2049500
2022-04-11 15:27:15 +02:00
Ygal Blum
bee14bf392 OSBuild - add support for generic S3 services
jobimpl-osbuild
---------------
Add GenericS3Creds to struct
Add method to create AWS with Endpoint for Generic S3 (with its own credentials file)
Move uploading to S3 and result handling to a separate method (along with the special VMDK handling)
adjust the AWS S3 case to the new method
Implement a new case for uploading to a generic S3 service

awscloud
--------
Add wrapper methods for endpoint support
Set the endpoint to the AWS session
Set s3ForcePathStyle to true if endpoint was set

Target
------
Define a new target type for the GenericS3Target and Options
Handle unmarshaling of the target options and result for the Generic S3

Weldr
-----
Add support for only uploading to AWS S3
Define new structures for AWS S3 and Generic S3 (based on AWS S3)
Handle unmarshaling of the providers settings' upload settings

main
----
Add a section in the main config for the Generic S3 service for credentials
If provided pass the credentials file name to the osbuild job implementation

Upload Utility
--------------
Add upload-generic-s3 utility

Makefile
------
Do not fail if the bin directory already exists

Tests
-----
Add test cases for both AWS and a generic S3 server
Add a generic s3_test.sh file for both test cases and add it to the tests RPM spec
Adjust the libvirt test case script to support already created images
GitLabCI - Extend the libvirt test case to include the two new tests
2022-04-07 15:01:01 +02:00
Jakub Rusz
7666049210 ci: re-enabled Installer test on centos-stream-9
Anaconda with the fix released in the centos-stream-9 repos. Also fixing
ostree runner matrix.
2022-04-06 12:53:35 +02:00
Xiaofeng Wang
62ab822695 test: Enable CS9 test for ostree-rebase and ostree 2022-04-06 08:59:37 +02:00
Jakub Rusz
e1bb8ab47c tests/ci: split regression tests
Regression test suite has grown considerably and is taking too long to
run with a single wrapper. Splitting them into individual standalone
tests instead and making them run in parallel.
2022-04-04 12:18:53 +02:00
Tomas Hozza
3bf62ca789 CI: test Cloud API with vsphere image
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-04-02 08:47:02 +01:00
Alexander Todorov
d117b84dc3 tests: Run SonarQube analysis only on main branch 2022-03-29 11:35:47 +02:00
Ondřej Budai
0eca6b4027 gitlab: split integration tests
We are running into a GitLab CI limitation:

jobs:integration:parallel:matrix config generates too many jobs (maximum is 50)

Let's split these jobs into separate ones.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-28 21:22:48 +02:00
Jakub Rusz
f1006c5adb ci/tests: re-enable Installers.sh test
Related bug has been fixed. Updating snapshots and enabling the test.
2022-03-25 16:00:39 +01:00
Jakub Rusz
8390709614 ci/details: list system repositories and run in after_script too
It is good to know what system repositories are used exactly on the
runner. Also running the ci_details.sh in after_script can help during
any debugging as packages that got updated or installed during the run
can be easily identified.
2022-03-25 16:00:39 +01:00
Ondřej Budai
80af9cac98 cloudapi: enable edge-commit on Fedora
We have to do a small hack to enable edge-commit on Fedora because its name
is different. We can also change this in the image definition but I want to
iterate quickly on the Fedora Integration MVP and don't want to run in
any conflicts with
https://github.com/osbuild/osbuild-composer/pull/2461

This commit also enables a test for Fedora IoT built through the API.

While enabling the test, I also simplified our decision logic for SSH_USER
and DISTRO.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-25 13:23:32 +01:00
Ondřej Budai
67e55eaea8 gitlab: run containerbuild on RHEL
Otherwise, we're running into
https://bugzilla.redhat.com/show_bug.cgi?id=2065292
and when I tried implementing a workaround, I ran into
https://bugzilla.redhat.com/show_bug.cgi?id=1897579

Gah.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-21 16:45:49 +01:00
Jakub Rusz
d8ea259f8b ci: run ci_details.sh in before_script
This is a nice script showing potentially useful details about the
runner so let's execute it at the begining of each job.
2022-03-14 14:24:59 +02:00
Ondřej Budai
ad15179faf packer: build Fedora images
The decision logic which jobs to run is quite confusing but that's how we
roll for now:

Jenkins builds RHEL images only on main
Schutzbot builds RHEL images only in PRs
Schutzbot builds Fedora images on both PRs and on main

To achieve this, the commit re-enables running Packer on main on Schutzbot.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-11 09:06:43 +01:00
Tomas Hozza
3a2002f557 CI: temporarily disable Installer test on el9/c9s due to rhbz#2059565
Temporarily disable Installer test case in the CI on RHEL-9 and CentOS
Stream 9 until https://bugzilla.redhat.com/show_bug.cgi?id=2059565 is
resolved. This test case is now consistently failing due to the
mentioned bug and makes it impossible for the CI to pass cleanly.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-03-08 13:53:16 +01:00
Ondřej Budai
2d16aeb467 tests: add an E2E test for multi-tenancy
See the comment. It's imho still very important to have this test
but its powers are limited.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-03-08 12:07:00 +01:00
Jakub Rusz
ba4f49078a ci: skip CI for draft and WIP PRs
Let only the init stage run so that we have a link on PRs to the CI and
can trigger it manually if desired. PR template updated with this info.
Also use yaml anchors for rules to reduce duplication.
2022-03-08 11:53:09 +01:00
Jakub Rusz
485fc68a98 tests/upgrade: add user choice for vdo devices check
This is a user choice that has to be picked before the upgrade or it
acts as an inhibitor.
2022-03-08 09:23:05 +01:00
Xiaofeng Wang
bc9d1431bc test: Add OSTree rebase test for OSTree parent ref support
To run ostree-rebase.sh, like RHEL 8.6 and RHEL 9, the CS8 VM
needs "large" flavor for more CPU and memory resource.
2022-02-23 11:08:24 +01:00
Jakub Rusz
f9fb593da3 ci: large runners for some ostree tests
The longer running ostree tests (all except ostree.sh) benefit from
running on large runners because of their long runtime. Changing all to
large runners. Should not be a problem with our increased Openstack
quota.
2022-02-21 12:02:55 +01:00
Achilleas Koutsou
d1ee43c9ec CI: run installers test on CS9 2022-02-18 10:39:08 +00:00
Achilleas Koutsou
96f3647464 CI: run tests on CentOS Stream 9
Tests need to be on the internal network to fetch the cert for epel for
EL9 (see provision.sh).
Use the large runner for all ostree-based tests since the regular one
seems to be running out of space.
2022-02-18 10:39:08 +00:00
Jakub Rusz
43bfcc5389 tests/upgrade: gather more logs
Also disable firwalld AllowZoneDrifting because it's not supported in
RHEL-9.
2022-02-18 09:25:01 +01:00
Jakub Rusz
8331af3ffd ci/nightly: report composer NVR in slack
Storing composer NVR in a file after it's installed and reporting on
Slack. Also reducing duplications of artifacts in .gitlab-ci.yml
2022-02-17 11:14:31 +01:00
Xiaofeng Wang
0bfc6cb4dd CI: Run ostree.sh on large RHEL 8.6 VM to have more memory
Fix "qemu-kvm: cannot set up guest memory 'pc.ram': Cannot allocate
memory" error
2022-02-16 10:49:55 +01:00
Jakub Rusz
0d64331ffe tests/ci: run all integration tests on fedora and centos 2022-02-07 11:37:13 +02:00
Alexander Todorov
0fb96345f2 tests: Disable SonarQube for nightly pipelines 2022-02-04 23:43:43 +01:00
Alexander Todorov
c5d62909e8 tests: Don't run cloud API tests for nightly trees
https://coreos.slack.com/archives/C0235DZB0DT/p1643969527395979?thread_ts=1643968867.786629&cid=C0235DZB0DT

Note: koji.sh already checks the $NIGHTLY variable and just exits
2022-02-04 23:43:43 +01:00
Alexander Todorov
3d86af796a Prepare CI to build -tests RPM for downstream testing from source 2022-02-04 23:43:43 +01:00
Juan Abia
2c8b12febd gitlab-ci: make every stage interruptible
scheduled cloud cleaner is now fully funcitoning. This means we can
auto-cancel whole pipelines on new commits.
2022-02-03 22:58:27 +01:00
sanne
08f668200a .gitlabci.yml: Add fedora-35 testing
Enable F34 testing on AWS as there is nothing blocking it. F34 is not
yet supported on `rhos-01` as there is no runner definition.

Remove F33 repositories for testing and add repo definitions for F34 and
F35.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-02-03 14:51:07 +01:00
Jakub Rusz
c173d88061 test/ci: add sonarqube scan
Adding sonarqube scan to the pipeline.
2022-02-01 16:38:43 +02:00
Juan Abia
2b69ad633e gitlab-ci: add internal network to runner
Scheduled cloud cleaner runner needs access to internal network to
interact with vmware.
2022-01-31 09:26:51 +01:00
Alexander Todorov
e6212cced6 Add Image Tests to nightly pipelines 2022-01-25 11:53:16 +01:00
Jakub Rusz
35fd20c0de ci: don't run iostats temporarily
CI job execution gets stuck if it fails and waits for timeout because
isostat are running in background preventing the main scrip from
exiting. Removing temporarily until a better solution is found.
2022-01-19 09:59:09 +01:00
Jakub Rusz
18ee1607a1 ci: change openstack runners to rhos-01
We can use both Openstack clouds now so switch to the new rhos-01
2022-01-19 09:59:09 +01:00
Ondřej Budai
f605fe9feb ci: drop Fedora 33
It's EOL.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-01-12 11:35:06 +01:00
Ondřej Budai
5da89ccce0 ci/container: switch to CS8
Fedora 33 is EOL, let's use something that will last longer than a single
Fedora release.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-01-12 11:35:06 +01:00
Jakub Rusz
564148b743 test/cases: Add test to verify osbuild-composer works after upgrade
This test provisions a RHEL-8.6 VM locally, installs osbuild-composer on
it, upgrades the system to RHEL-9.0 and verifies osbuild-composer still
works by building a simple qcow image.
2022-01-06 21:30:46 +01:00
Juan Abia
9c946a306e ci: enable zure testing on centos-8
this test was disabled because it blocked CI, to be solved later. See
COMPOSER-1118
2022-01-06 13:54:55 +01:00
sanne
71da979c81 tools: AppSRE packer build 2022-01-05 22:13:55 +01:00