Make it possible to combine the orchestration of different scenarios
If we want to run tests using setup that doesn't exist in any scenario, we need to create a new scenario. This is true even if there are existing scenarios that separately include the required setup.
For example, we have a Packages scenario and an ObjectStorage scenario, but if we wanted to run tests where packages are stored in object storage, we'd have to write a new scenario that combines the setup defined in the two existing scenarios, thereby duplicating them.
Proposal
Allow omnibus configuration and external components to be combined dynamically based tags. For example, if I run the Test::Instance::Image
scenario with the :object_storage
and packages
tags, gitlab-qa
should include the omnibus configuration that's currently in the Test::Integration::Packages
scenario, and the configuration that's currently in the Test::Integration::ObjectStorage
scenario.
In pseudocodeish:
if `--tag packages`
gitlab.omnibus_config += <<~OMNIBUS
gitlab_rails['packages_enabled'] = true;
OMNIBUS
end
if `--tag object_storage`
gitlab.omnibus_config += <<~OMNIBUS
<insert the configuration that enables object storage>
OMNIBUS
Component::Minio.perform do |minio|
<insert the minio container config and start the container>
end
end