mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(cli): inherit provisioner tags from last template version (#13462)
This commit is contained in:
@@ -100,6 +100,16 @@ func (r *RootCmd) templatePush() *serpent.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
// If user hasn't provided new provisioner tags, inherit ones from the active template version.
|
||||
if len(tags) == 0 && template.ActiveVersionID != uuid.Nil {
|
||||
templateVersion, err := client.TemplateVersion(inv.Context(), template.ActiveVersionID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
tags = templateVersion.Job.Tags
|
||||
inv.Logger.Info(inv.Context(), "reusing existing provisioner tags", "tags", tags)
|
||||
}
|
||||
|
||||
userVariableValues, err := ParseUserVariableValues(
|
||||
varsFiles,
|
||||
variablesFile,
|
||||
|
||||
Reference in New Issue
Block a user