Commit graph

92 commits

Author SHA1 Message Date
Tom Koscielniak
557d5f440c tests/CI: Add runners for RHEL 9.7 and 10.1
Add runners for RHEL 9.7 and 10.1 and remove 9.6 and 10.0 runners.
2025-06-03 17:06:52 +02:00
Yi He
867ff9c06e ci: change to rhel 9.6 2024-11-21 08:14:22 +01:00
Alexander Todorov
8d0eb8b0cb Replace 9.4 conditions with 9.5 conditions inside test scripts 2024-06-07 10:31:54 +02:00
Alexander Todorov
85ce42570d Refactor how the 'trap' command is used to avoid double calls
in many files there was a secondary call to `trap` for the sole purpose
of killing jornalctl (watching worker logs) so that GitLab CI doesn't
hang.

The issue with this is that sometimes the cleared the trap which invokes
the cleanup() function without reinstating it again (not everywhere).

Instead of doing this back-and-forth just make sure we don't leave any
journalctl processes dangling in the background!

NOTES:

- for some scripts, mainly ostree- ones there was no cleanup trap
  present, but instead `trap` was configured inside the build_image() function.
  The trouble is that this function is executed multiple times and
  $WORKER_JOURNAL_PID changes value between these multiple executions.
  That's why these scripts introduce the cleanup_on_exit() function where
  we make sure to kill any possible dangling journalctl processes.
- The name `cleanup_on_exit()` is chosed because these same scripts
  often have a helper function named clean_up() which is sometimes used to remove
  virtual machines and other artifacts between calls of build_image().
2024-04-19 13:16:11 +03:00
Tom Koscielniak
b4dcfc4480 Remove libvirt workaround 2024-03-04 15:39:08 +01:00
Miguel Martín
38f9687cc1 Clean up libvirt network
Clean up libvirt network once the script has
finished successfully.
2023-12-13 10:19:47 +01:00
Miguel Martín
53955af7ca Do not run set-env-variables.sh
Do not run `set-env-variables.sh` to set ARCH and OS variables
to avoid the CI failing because of shellcheck lint problems.

Signed-off-by: Miguel Martín <mmartinv@redhat.com>
2023-12-13 10:19:47 +01:00
Jakub Rusz
5cbc87eade test/cases: clean up older distros in ostree.sh 2023-11-27 10:04:47 +01:00
Jakub Rusz
04ba4b81d8 Switch testing to 8.10 and 9.4 nightly 2023-11-27 10:04:47 +01:00
yih
3d7b01b18d update pulp test case 2023-10-18 21:14:46 +02:00
yih
f4afef2890 update pulp test case 2023-10-18 21:14:46 +02:00
yih
6a98136cc0 add pulp test case 2023-10-18 21:14:46 +02:00
Xiaofeng Wang
44e6278c9d test: remove workaround for bug BZ#2234390 2023-09-18 18:14:58 -07:00
Alexander Todorov
f2f1c8d0f0 Remove deprecated --os-type cli argument
test logs print:

[2023-08-22T10:18:14-04:00] 💿 Install image via installer(ISO) on VM
WARNING  --os-type is deprecated and does nothing. Please stop using it.
2023-09-01 13:22:30 +02:00
Xiaofeng Wang
f0eb8e9738 test: add workaround for bug BZ#2234390 2023-08-30 09:29:50 +02:00
Xiaofeng Wang
336842d7bb test: update ostree.sh to test ostree commit as value of --parent 2023-08-10 12:49:44 +02:00
Brian C. Lane
4c7b3dd25a test: Make log errors easier to find
We were using greenprint for failures, which makes it hard to quickly
find where the tests failed. This switches errors to use redprint, and
adds it to places that were simply using echo before doing an exit 1.
2023-08-02 14:46:35 +02:00
Xiaofeng Wang
967570a2a6 test: Add workaround for BZ#2213660 and #2225667 2023-07-26 22:23:41 +08:00
Xiaofeng Wang
2baaa20859 test: Four fixes for RHEL for Edge tests
1. Remove ansible-blocking-io.py workaround. It's not required.
2. Variable should be PROD_REPO_URL, not STAGE_REPO_URL in
ostree-raw-image.sh
3. Use --reboot in rpm-ostree install to reboot VM instead of
a reboot ansible task
4. Wait until config file serviceinfo_api_server.yml exists, to
avoid file not available to use flaky issue
2023-06-30 09:07:39 +08:00
Ondřej Budai
3fb55413dc test/cases: make fedora conditions generic for all versions
To save us some work when updating the tests.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-06-26 17:56:20 +02:00
Alexander Todorov
1f28e50d21 Adjust tests for new distros
References:
- https://redhat-internal.slack.com/archives/C0235DZB0DT/p1685528139831589
- 1fbd9d975f
2023-06-15 08:54:57 +02:00
Xiaofeng Wang
49bad21c45 CI: Move RHEL for Edge CI into osbuild/rhel-edge-ci repo
1. Run RHEL for Edge CI on osbuild/rhel-edge-ci repo
2. Use released RHEL 8.8 and 9.2 boot ISO
3. Extend VM memory to 3072 on ostree.sh to fix error
"Overriding memory to 3072 MiB needed for centos-stream9 network install."
4. Install and start firewalld, configure VM network as trusted zone
2023-06-12 10:00:23 +02:00
Simon de Vlieger
5e6c0642cd fedora: f36 went EOL
Removes all references to Fedora 36 since it went EOL.

See: https://docs.fedoraproject.org/en-US/releases/eol/
2023-06-05 18:14:34 +02:00
Mario Cattamo
54ce49a852 Test fedora minimal embedded container 2023-04-27 14:01:44 +02:00
Jakub Rusz
ecd69ca25b tests/ostree: Change centos-8 BOOT_LOCATION to a working boot.iso
The latest boot.iso stopped working. Changing to an older version to
unblock CI. RHBZ#2180024 opened with this issue.
2023-03-20 17:59:20 -07:00
yih
d7e2e5d740 add sysroot permission test 2023-03-09 18:54:06 +08:00
yih
266cfdcc44 fix ansible error on centos9 2023-03-02 16:03:11 +01:00
Tomáš Hozza
6cd7892c47 Test/ostree: test dirs and files customizations
Test the directories and files customization with the ostree commit
image type.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Tomáš Hozza
50fc6cc29c Test: reformat part of ostree.sh
Split the call to `ansible-playbook` to multiple lines.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Mario Cattamo
b68cf83a8e Update boot location for Fedora 37 edge-commit 2023-02-21 09:46:27 +01:00
yih
64db6485c9 fix ostree cannot boot on fedora37 2023-01-17 10:54:29 +01:00
Jakub Rusz
340f79c537 tests/ostree: use local install
Download the boot.iso to the hypervisor to use local install instead of
networked which allows to use lower RAM.
2023-01-10 00:28:23 +01:00
Alexander Todorov
a8df4879ac Adjust tests for 8.8 and 9.2 2023-01-10 00:28:23 +01:00
Mario Cattamo
9426b15913 Set up firewall feature flag value 2022-12-06 16:39:00 +01:00
Mario Cattamo
7871ab49e9 Test firewall sources and zones customizations in edge-commit blueprint 2022-12-06 16:39:00 +01:00
Xiaofeng Wang
989c64040c test: Add Fedora 36 and 37 and remove 35 test for ostree.sh 2022-10-03 12:21:39 +02:00
Achilleas Koutsou
1d121126b0 test: use new canonical image type names in tests 2022-09-20 18:29:28 +02:00
Achilleas Koutsou
bf83bbea38 test: move greenprint and redprint functions to shared_lib.sh
Since we're sharing functions between test scripts, move greenprint(),
the most rewritten function in the history of the project, to
shared_lib.sh and source it everywhere.
2022-09-13 16:06:19 +01:00
Achilleas Koutsou
3b14828669 test: new weldr client compatibility for test scripts
- Handle the array responses from the new weldr-client (>= 35.6).
- Move the `get_build_info` function to shared_libs.sh to source and
  reuse in multiple places.
2022-09-13 16:06:19 +01:00
Ondřej Budai
e2a298723e ci: enable fedora 37 tests
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-09-13 16:06:19 +01:00
Xiaofeng Wang
53d4d7f284 test: Improvements for container embedding Edge test 2022-08-12 10:18:29 +03:00
Tomas Hozza
a4b0efb278 provision.sh: add none authentication method for on-premise scenario
`tools/provision.sh` is provisioning SUT always in the same way for
both, the Service scenario and the on-premise scenario. While this is
not causing any issues, it does not realistically represent how we
expect osbuild-composer and worker to be used in these scenarios.

The script currently supports the following authentication options:
- `none`
  - Intended for the on-premise scenario with Weldr API.
  - NO certificates are generated.
  - NO osbuild-composer configuration file is created.
  - NO osbuild-worker configuration file is created. This means that no
    cloud provider credentials are configured directly in the worker.
  - Only the local worker is started and used.
  - Only the Weldr API socker is started.
  - Appropriate repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
- `jwt`
  - Intended for the Service scenario with Cloud API.
  - Should be the only method supported in the Service scenario in the
    future.
  - Certificates are generated and copied to `/etc/osbuild-composer`.
  - osbuild-composer configuration file is created and configured for
    JWT authentication.
  - osbuild-worker configuration file is created, configured for JWT
    authentication and with appropriate cloud provider credentials.
  - Local worker unit is masked. Only the remote worker is used (the
    socket is started and one remote-worker instance is created).
  - Only the Cloud API socket is started (Weldr API socket is stopped).
  - NO repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
- `tls`
  - Intended for the Service scenario with Cloud API.
  - Should eventually go away.
  - Certificates are generated and copied to `/etc/osbuild-composer`.
  - osbuild-composer configuration file is created and configured for
    TLS client cert authentication.
  - osbuild-worker configuration file is created, configured for TLS
    authentication and with appropriate cloud provider credentials.
  - Services and sockets are started as they used to be originally:
    - Both local and remote worker sockets are started.
    - Both Weldr and Cloud API sockets are started.
    - Only the local worker unit will be started automatically.
  - NO repository definitions are copied to
    `/etc/osbuild-composer/repositories/`.
2022-08-04 11:55:43 +02:00
Xiaofeng Wang
c71ae8f455 test: Update tests to support embeded container image feature
Container image can only be embeded on commit Use fedora image
instead of ubi8 and only run embeded image checking on  RHEL
8.7, 9.1, CS8 and CS9.
2022-07-26 17:07:31 +02:00
Alexander Todorov
d36e005b37 Update tests with config for Fedora 36 2022-07-21 12:19:38 +03:00
Jakub Rusz
efbd5ebd7b ci/tests: Change the way artifacts are collected
We want to be able to safely gather any artifacts without worrying about
any possible secrets leaking. Every artifacts that we want to upload
will now have to be placed in /tmp/artifacts which will then be uploaded
to S3 by the executor and link to the artifacts will be provided in the
logs. Only people with access to our AWS account can see them.
2022-07-18 11:33:57 +03:00
Xiaofeng Wang
9a66ffa78b test: Install package sssd in all edge images for BZ#2088459 2022-07-16 16:14:56 +02:00
Achilleas Koutsou
2c2d4812d4 CI: bring back tests on RHEL 8.4
We stopped testing on RHEL 8.4 because it wasn't changing, but now it
will be (or might) since it lives inside the common rhel8 package.
Testing the distro ensures we don't break it.  RHEL 8.4 is still
supported as EUS.

We will soon change the distro definition to specifically build 8.4 EUS.

Pin osbuild version for RHEL 8.4.

Change the ostree test to support 8.4 (and not 8.5).
2022-07-08 09:30:34 +01:00
Jakub Rusz
5fcf0b1d53 tests/ostree: Update to support new RHEL nightlies 2022-06-21 10:40:58 +02:00
Achilleas Koutsou
be382ecef8 test/ostree: update ostree compose request to match new requirements
Specifying a parent commit ID without a URL isn't allowed now.  The
upgrade commit is built without a parent.  The OS upgrade should still
work without it.
Getting the ID of the first commit is not necessary now.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
d271de346f test/ostree: use production compose for virt boot location 2022-02-18 10:39:08 +00:00