One of the things I dislike about our current test setup is the fact that we create a new file for every version we test in forklift. This makes creating new pipelines tedious (esp reviewing PRs that add them) and adds a bit of drift where “new stuff” gets added to the newly created pipe, but does not get backported to older ones. And I’d like to change that
- As a pipeline author/maintainer I want to
- add new pipelines without writing much boilerplate ansible
- adjust existing pipelines easily
- review only the relevant parts of a newly added pipeline
- As a developer I want to
- have a single command to run a pipeline on my workstation that corresponds 100% to what Jenkins runs nightly
The developer one is already implemented today and is only listed here so that we don’t break that experience.
Instead of having each pipeline in a separate file, I’d like to introduce a “generic” pipeline for each topic (Foreman, Katello, Katello Upgrade, etc). These pipelines will be version-agnostic in their definition and will load a version-specific file using Ansbile’s
vars_files directive. This will allow us to only submit new variable files when we add new pipelines and adjustments to the main pipeline file will benefit all versions instantly.
The invocation of the pipeline will slightly change from
ansible-playbook pipeplines/pipeline_<type>_<version>.yml to
ansible-playbook pipeplines/pipeline_<type>.yml -e version=<version> and thus remain the “one command rules them all” requirement.
Please have a look at the
rework-pipelines branch of my forklift fork for an example implementation of my idea.