-
Notifications
You must be signed in to change notification settings - Fork 887
Push, but create if does not exist: coder templates push --create
#6851
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
Comments
I've heard roughly ~6 users ask for this in calls who plan on automating Coder with CI. Of course, a bash conditional can be used, but this would be a good quick win. Kind of like |
I have spent quite well time and effort on this in #8068 but it isn't as straightforward as it looks. Original IdeaMy original idea was to just create an alias for It turns out that many of the flags are different for both of the commands and simple aliasing will not work. 2nd approachTry to reuse the minimum possible code from the Also, it turns out that to create a new template we first need to create a version and then create a template, while for updating an existing template we just need to create a new version of the existing template I ended up creating 2 versions if I use this approach. Way forwardMaybe a better approach will be to refactor the common functionality of P.S. Thanks, @johnstcn for your help when I was stuck. |
I'm looking around the CLI now, so I can spend some time here. |
Did this get removed again later? I tried adding this flag to my coder push command but the flag was rejected. Help output shows I'm up-to-date with coder's release recent release, but the flag is not mentioned at all:
Any ideas? |
Hi @TamaMcGlinn are you trying to add |
Would be great to either push or create with one command. Good for CI
The text was updated successfully, but these errors were encountered: