giantswarm / roadmap

Giant Swarm Product Roadmap
https://github.com/orgs/giantswarm/projects/273
Apache License 2.0
3 stars 0 forks source link

Find an alternative to the current template process #3706

Closed piontec closed 6 days ago

piontec commented 2 weeks ago

I checked two very similar projects for scaffolding and generating new repos from templates:

The first one seems better for us, as it uses go templates. But using any of them still has the same basic problem: the source repo is full of template placeholders, so you can't work with the repo directly, you can't build or validate it.

2 solutions come to my mind:

  1. Just use plain [A-z] placeholders, like REGISTRY_HOST instead of [[REGISTRY_HOST]]. Replace with sed as it is now. Repo might get buildable this way, although some validation for placeholder values might fail (i.e. a field with a placeholder must validate as a number, while it is REPLICA_COUNT in the repo.
  2. Use one of the templating engines (boilerplate) and to build and validate changes to the template repo, the CI/CD first runs the templating engine, then validates the templated output.

I'm leaning towards 2.

Note: we don't focus that much towards CI/CD part of the build process, we only want it to be reasonable.

piontec commented 6 days ago

Done, using boilerplate now