Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find an alternative to the current templat process #3706

Open
Tracked by #3470
piontec opened this issue Oct 3, 2024 · 0 comments
Open
Tracked by #3470

Find an alternative to the current templat process #3706

piontec opened this issue Oct 3, 2024 · 0 comments
Assignees
Labels
team/honeybadger Team Honey Badger

Comments

@piontec
Copy link

piontec commented Oct 3, 2024

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 piontec self-assigned this Oct 3, 2024
@piontec piontec added the team/honeybadger Team Honey Badger label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team/honeybadger Team Honey Badger
Projects
Status: Inbox 📥
Development

No branches or pull requests

1 participant