github.com/kubeshop/testkube@v1.17.23/cmd/kubectl-testkube/commands/agent.go (about) 1 package commands 2 3 import ( 4 "github.com/spf13/cobra" 5 6 "github.com/kubeshop/testkube/cmd/kubectl-testkube/commands/agent" 7 "github.com/kubeshop/testkube/cmd/kubectl-testkube/commands/common" 8 "github.com/kubeshop/testkube/pkg/ui" 9 ) 10 11 func NewAgentCmd() *cobra.Command { 12 cmd := &cobra.Command{ 13 Use: "agent", 14 Short: "Testkube Pro Agent related commands", 15 Run: func(cmd *cobra.Command, args []string) { 16 client, _, err := common.GetClient(cmd) 17 ui.ExitOnError("getting client", err) 18 19 info, err := client.GetServerInfo() 20 if err != nil { 21 info.Version = info.Version + " " + err.Error() 22 } 23 24 ui.Logo() 25 ui.Info("Client Version", common.Version) 26 ui.Info("Server Version", info.Version) 27 ui.Info("Commit", common.Commit) 28 ui.Info("Built by", common.BuiltBy) 29 ui.Info("Build date", common.Date) 30 31 }, 32 } 33 34 cmd.AddCommand(agent.NewAgentDebugCmd()) 35 36 return cmd 37 }