C
Coder.com10mo ago
Bob

Templates and Github

Is it at all possible to push changes made to templates via Coder’s template editor UI to Github? There’s documentation (https://coder.com/docs/v2/latest/templates/change-management and https://coder.com/blog/keeping-templates-up-to-date) about using CI/CD to push changes to git-managed templates to Coder. Since editing templates is possible via the UI, is it possible to push changes made in the UI to Github?
Change management - Coder v2 Docs
Versioning templates with git and CI
14 Replies
Codercord
Codercord10mo ago
<#1210411409209294870>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Atif
Atif10mo ago
No currently it's not possible. But I agree that it would be a nice to have
JFK
JFK8mo ago
Are the templates on the filesystem of the Coder host (considering OSS v2). If so where are they located?
Atif
Atif8mo ago
They are in the postgresdb. Nothing is on filesystem
Phorcys
Phorcys8mo ago
it's currently not implemented but maybe you can hack together something that will periodically pull the template and push to GH or you can also implement a CI/CD workflow that will check if changes have been done on the instance whenever a PR is opened
Zorkin
Zorkin8mo ago
Would be useful to have a webhook from coder on template change that triggers these flows On a related note , coder template push isn’t as far as I can tell idempotent? If the template file is unchanged it still creates a new version?
Phorcys
Phorcys8mo ago
I'm not sure but it probably doesn't care yes you can pull and compare maybe ?
Zorkin
Zorkin8mo ago
It doesn’t seem to care if the template was actually changed. It just creates a new version.
Phorcys
Phorcys8mo ago
yeah that's not surprising do you need it to care ?
Zorkin
Zorkin8mo ago
It would make some things simpler ( managing all my templates in one gitlab project ) but not critical
Atif
Atif8mo ago
It would be nice if we can just link a mono repo anc coder can laod all templates from it 2-way sync would be a nice to have
JFK
JFK8mo ago
I love the ability to update the TF and Docker buildfile from the UI. it's great for adding little things on the fly. But agree there needs to be some way to sync these changes to a repository.
Phorcys
Phorcys8mo ago
@Bob, I think you should open a feature request issue in the repo
Phorcys
Phorcys8mo ago
GitHub
Issues · coder/coder
Provision remote development environments via Terraform - Issues · coder/coder
Want results from more Discord servers?
Add your server