Here is my use case: I would like to generate docker-compose.yml files from a template, then push them each to the current OneDev Git repo.
So, I need a templating tool that would seamlessly fit into OneDev's own templating system.
How do I see the process:
I create a Job in a project that I will use as a template for other projects (basically, all my images are derived from a single "mother" and therefore share similar docker-compose.yml files)
I define the relevant proprieties (ie the 3-letters code I will use within each docker-compose.yml file)
I create a step where I define a text template as code.
Then, I create a project that imports the previous one as a template
I instantiate the value of the propriety that supersedes the template's one
Executing the imported job will fill in the "blanks" then push the resulting docker-compose.yml file into the repo
Stephen Schanged title2 years ago
Previous Value
Current Value
What text templating tool do you recommend?
What CLI text templating tool do you recommend?
Robin Shen commented 2 years ago
Any template system can be used to compose your docker-compose.yml as long as any literal occurrences of @ should be written as @@
Stephen S commented 2 years ago
Which one do you use?
Stephen S commented 2 years ago
Also I want it to be compatible with the editor in the Steps of OneDev so that I can rely on its logic (@property:xxx).
Ideally, I would like to write something like:
OneDev uses a home-grown system to prompt/substitute variables. You can pass properties this way to your chosen template engine as variables. I guess all template engine has that ability.
Stephen S commented 2 years ago
OK will try and will let you know, might help other users
Here is my use case: I would like to generate
docker-compose.yml
files from a template, then push them each to the current OneDev Git repo. So, I need a templating tool that would seamlessly fit into OneDev's own templating system.How do I see the process:
docker-compose.yml
files)docker-compose.yml
file)docker-compose.yml
file into the repo