NewRenderCmd creates a new devspace render command
(f factory.Factory, globalFlags *flags.GlobalFlags, rawConfig *RawConfig)
| 11 | |
| 12 | // NewRenderCmd creates a new devspace render command |
| 13 | func 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 | ####################################################### |
| 33 | Builds all defined images and shows the yamls that would |
| 34 | be deployed via helm and kubectl, but skips actual |
| 35 | deployment. |
| 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 | } |
no test coverage detected