Tap Fitter is a utility designed to aid operator developers to generate the configuration files needed to properly run in certain pipeline environments.
This CLI tool will ingest composite templates and generate the appropriate devfiles.
To build the utility, run make build
from the root directory of the tap-fitter project.
The tap-fitter
command will ingest composite templates and generate corresponding devfiles.
Note: because templates may use relative paths to related artifacts, tap-fitter
should be run in the same location as input templates.
$ ./tap-fitter -h
tap-fitter reads a composite template and outputs corresponding devfiles to prepare a repository for a catalog production pipeline.
Note: because templates may use relative paths to related artifacts, tap-fitter should be run in the same location as input templates.
Usage:
tap-fitter [flags]
Flags:
-c, --catalog-path string [REQUIRED] the path/URL to the catalog template used for configuration
-t, --composite-path string [REQUIRED] the path to the composite template used for configuration
-h, --help help for tap-fitter
-p, --provider string the provider of the catalog (default "tap-fitter")
This quick start example will use the composite templates found in the fbc-composite-example repository to generate devfiles from.
# Clone the tap-fitter repo
git clone https://github.com/release-engineering/tap-fitter.git
git clone https://github.com/everettraven/fbc-composite-example.git
- Navigate to the tap-fitter repository to build the CLI tool
cd tap-fitter
make build
- Navigate to the destination repo and run the tap-fitter command
cd ../fbc-composite-example
../tap-fitter/tap-fitter --catalog-path catalogs.yaml --composite-path contributions.yaml
- Verify the devfiles were correctly generated
$ tree catalogs catalogs ├── v4.10 │ ├── devfile.yaml │ └── my-package │ └── catalog.yaml ├── v4.11 │ ├── devfile.yaml │ └── my-package │ └── catalog.yaml ├── v4.12 │ ├── devfile.yaml │ └── my-package │ └── catalog.yaml └── v4.13 ├── devfile.yaml └── my-package └── catalog.yaml
9 directories, 8 files
## Schema Mapping
The below example illustrates how the specs for the [composite-catalog](https://olm.operatorframework.io/docs/reference/catalog-templates/#olmcompositecatalogs) combine with options from the program and user to generate a devfile result. Each configurable option has a numerical callout indicating origin, correlation, and output.
![](tap-fitter-schema-fit.drawio.svg)
## Future work
- Enable the use of explicit paths