Make the sources options a static property of the pipeline, in particular of each stage, rather than being passed in on `run()`. This more closely matches the intended semantics of sources and pipeline having similar lifetimes and being fairly coupled together. The difference between the pipeline and the sources is that the sources do not contribute to identifying the pipeline (they are not part of the hash for the pipeline id), and they could be swapped out without changing the output image (as long as they are valid). However, a pipeline without A sources object would not be useful, and typically the pipeline and the sources are generated, passed around and used together. This is different from the build environment and the secrets object, which both are specific to either the host or the caller, unlike the pipeline which should be universal. This changes the `load()` function to take a `manifest`, which is a map containing both the pipeline and the sources. Note that the semantics of the build-env parameter remains unchanged: It shares the sources with the rest of the pipeline. We may want to reconsider this in future commits, as the build-env is specific to the host, whereas the regular pipeline is not. Signed-off-by: Tom Gundersen <teg@jklm.no> |
||
|---|---|---|
| .. | ||
| pipelines | ||
| sources_tests/org.osbuild.files | ||
| stages_tests | ||
| testing-rpms | ||
| .gitignore | ||
| __init__.py | ||
| osbuildtest.py | ||
| README.md | ||
| test_assemblers.py | ||
| test_boot.py | ||
| test_objectstore.py | ||
| test_osbuild.py | ||
| test_sources.py | ||
| test_stageinfo.py | ||
| test_stages.py | ||
Setup
To run the tests in vagrant virtual machine, please follow this tutorial: https://developer.fedoraproject.org/tools/vagrant/vagrant-libvirt.html
(run also sudo systemctl start libvirtd)
Using Vagrant
To start a Vagrant box by hand, run vagrant up in this directory. To stop and remove all volumes run vagrant destroy again in this directory.
Troubleshooting
In case you accidentally deleted .vagrant directory, you can use some of these commands in order to get rid of running instance:
$ virsh list # this should display test_default
$ virsh managedsave-remove test_default
$ virsh undefine test_default
# or using vagrant cli tool
$ vagrant global-status
$ vagrant destroy <id>
$ vagrant global-status --prune