Skip to content

feat(cli): add --create flag to coder templates push #8068

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

Closed
wants to merge 29 commits into from

Conversation

matifali
Copy link
Member

@matifali matifali commented Jun 16, 2023

fixes #6851

@matifali matifali changed the title feat: add --create flag to coder templates push feat(cli): add --create flag to coder templates push Jun 16, 2023
@matifali matifali marked this pull request as ready for review June 16, 2023 14:53
@matifali matifali added the cli Area: CLI label Jun 16, 2023
@matifali matifali marked this pull request as draft June 19, 2023 07:56
@coder coder deleted a comment from github-actions bot Jun 22, 2023
@matifali
Copy link
Member Author

/deploy-pr

@github-actions
Copy link

github-actions bot commented Jun 23, 2023

✔️ Deployed PR 8068 successfully.
🚀 Access the deployment link here.
⚠️ This deployment will be deleted when the PR is closed.

inactivityTTL := 0 * time.Hour
disableEveryone := false
createReq := codersdk.CreateTemplateRequest{Name: name, DefaultTTLMillis: ptr.Ref(defaultTTL.Milliseconds()), FailureTTLMillis: ptr.Ref(failureTTL.Milliseconds()), InactivityTTLMillis: ptr.Ref(inactivityTTL.Milliseconds()), DisableEveryoneGroupAccess: disableEveryone}
template, err = client.CreateTemplate(inv.Context(), organization.ID, createReq)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line specifically. The object template isn't being updated as expected.
@johnstcn

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing CreateTemplateRequest.VersionID - creating a template requires a template version to be present.

@matifali matifali closed this Jun 29, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2023
@matifali matifali deleted the matifali/template-push-create branch July 1, 2023 01:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cli Area: CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push, but create if does not exist: coder templates push --create
2 participants