MCPcopy Index your code
hub / github.com/devspace-sh/devspace / NewRenderCmd

Function NewRenderCmd

cmd/render.go:13–44  ·  view source on GitHub ↗

NewRenderCmd creates a new devspace render command

(f factory.Factory, globalFlags *flags.GlobalFlags, rawConfig *RawConfig)

Source from the content-addressed store, hash-verified

11
12// NewRenderCmd creates a new devspace render command
13func NewRenderCmd(f factory.Factory, globalFlags *flags.GlobalFlags, rawConfig *RawConfig) *cobra.Command {
14 cmd := &RunPipelineCmd{
15 GlobalFlags: globalFlags,
16 SkipPushLocalKubernetes: true,
17 Pipeline: "deploy",
18 Render: true,
19 RenderWriter: os.Stdout,
20 }
21
22 var pipeline *latest.Pipeline
23 if rawConfig != nil && rawConfig.Config != nil && rawConfig.Config.Pipelines != nil {
24 pipeline = rawConfig.Config.Pipelines["deploy"]
25 }
26 renderCmd := &cobra.Command{
27 Use: "render",
28 Short: "Builds all defined images and shows the yamls that would be deployed",
29 Long: `
30#######################################################
31################## devspace render #####################
32#######################################################
33Builds all defined images and shows the yamls that would
34be deployed via helm and kubectl, but skips actual
35deployment.
36#######################################################`,
37 RunE: func(cobraCmd *cobra.Command, args []string) error {
38 f.GetLog().Warnf("This command is deprecated, please use 'devspace deploy --render' instead")
39 return cmd.Run(cobraCmd, args, f, "renderCommand")
40 },
41 }
42 cmd.AddPipelineFlags(f, renderCmd, pipeline)
43 return renderCmd
44}

Callers 1

BuildRootFunction · 0.85

Calls 4

RunMethod · 0.95
AddPipelineFlagsMethod · 0.95
GetLogMethod · 0.65
WarnfMethod · 0.45

Tested by

no test coverage detected