|
| 1 | +# Note that this provisioning defaults to using a locally built bootc |
| 2 | +# disk image. The default runs in Github Actions use nested KVM |
| 3 | +# to run most of these tests. |
| 4 | +# |
| 5 | +# However, Packit+Testing Farm provisions a stock package-based |
| 6 | +# cloud VM. When it does that, it ignores the `provision:` tag |
| 7 | +# here, sets running_env=packit, and installs the build artifacts to |
| 8 | +# /var/share/test-artifacts/. The prepare phase then builds a bootc |
| 9 | +# image and reinstalls the system. |
| 10 | +# |
| 11 | +# The idea here is all of our tests should work when started from |
| 12 | +# a package-based host *or* an image-based one. |
| 13 | +# |
| 14 | +# For local testing: |
| 15 | +# - Standard workflow: Use tests/run-tmt.sh (builds bootc image first, sets running_env=image_mode) |
| 16 | +# |
| 17 | +# To reproduce Testing Farm workflow locally with testcloud: |
| 18 | +# Testing Farm provisions a stock cloud VM, creates a yum repo for the copr build artifacts, |
| 19 | +# installs binary RPMs (bootc, system-reinstall-bootc), and places the SRPM in |
| 20 | +# /var/share/test-artifacts/. The prepare phase then builds a bootc container image and |
| 21 | +# reinstalls the system. To reproduce locally: |
| 22 | +# |
| 23 | +# 1. Build packages in current directory: |
| 24 | +# fedpkg --release f42 srpm |
| 25 | +# mock -r fedora-42-x86_64 --resultdir=. bootc-*.src.rpm |
| 26 | +# 2. Run with inserted prepare steps to set up artifacts on the VM: |
| 27 | +# tmt --context running_env=packit run -a \ |
| 28 | +# provision -h virtual --image fedora \ |
| 29 | +# prepare --insert --order 96 -h install -p createrepo_c \ |
| 30 | +# prepare --insert --order 96 -h shell \ |
| 31 | +# -s 'mkdir -p /var/share/test-artifacts /var/tmp/bootc-repo' \ |
| 32 | +# -s 'cp bootc-*.src.rpm /var/share/test-artifacts/' \ |
| 33 | +# -s 'cp bootc-*.rpm system-reinstall-bootc-*.rpm /var/tmp/bootc-repo/' \ |
| 34 | +# -s 'createrepo_c /var/tmp/bootc-repo' \ |
| 35 | +# -s 'printf "[test-artifacts]\nname=test-artifacts\nbaseurl=file:///var/tmp/bootc-repo\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/test-artifacts.repo' |
| 36 | +# |
| 37 | +# Note: tmt syncs the test tree (including files in current directory) to the guest. |
1 | 38 | provision: |
2 | 39 | how: virtual |
3 | 40 | image: $@{test_disk_image} |
|
0 commit comments