deploy

package
v0.7.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package deploy provides the command to deploy infrastructure.

Index

Constants

This section is empty.

Variables

View Source
var DeployCmd = &cobra.Command{
	Use:     "deploy",
	Example: `  contextvibes factory deploy`,
	Args:    cobra.NoArgs,
	RunE: func(cmd *cobra.Command, _ []string) error {
		presenter := ui.NewPresenter(cmd.OutOrStdout(), cmd.ErrOrStderr())
		ctx := cmd.Context()

		cwd, err := os.Getwd()
		if err != nil {
			return fmt.Errorf("failed to get working directory: %w", err)
		}

		projType, err := project.Detect(cwd)
		if err != nil {
			return fmt.Errorf("failed to detect project type: %w", err)
		}

		switch projType {
		case project.Terraform:
			return executeTerraformDeploy(
				ctx,
				presenter,
				globals.ExecClient,
				cwd,
				globals.AssumeYes,
			)
		case project.Pulumi:
			return executePulumiDeploy(ctx, presenter, globals.ExecClient, cwd, globals.AssumeYes)
		case project.Go, project.Python, project.Unknown:
			fallthrough
		default:
			presenter.Info("Deploy command is not applicable for this project type (%s).", projType)

			return nil
		}
	},
}

DeployCmd represents the deploy command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL