deploy

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner)

NewCommand creates a new Cobra command and a Runner to deploy a Bicep or ARM template to a specified environment, with optional parameters. It also adds common flags to the command for workspace, resource group, environment name, application name and parameters.

Types

type Runner

type Runner struct {
	Bicep             bicep.Interface
	ConfigHolder      *framework.ConfigHolder
	ConnectionFactory connections.Factory
	Deploy            deploy.Interface
	Output            output.Interface

	ApplicationName     string
	EnvironmentNameOrID string
	FilePath            string
	Parameters          map[string]map[string]any
	Workspace           *workspaces.Workspace
	Providers           *clients.Providers
}

Runner is the runner implementation for the `rad deploy` command.

func NewRunner

func NewRunner(factory framework.Factory) *Runner

NewRunner creates a new instance of the `rad deploy` runner.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context) error

Run deploys a Bicep template into an environment from a workspace, optionally creating an application if specified, and displays progress and completion messages. It returns an error if any of the operations fail.

func (*Runner) Validate

func (r *Runner) Validate(cmd *cobra.Command, args []string) error

Validate validates the workspace, scope, environment name, application name, and parameters from the command line arguments and returns an error if any of these are invalid.

Jump to

Keyboard shortcuts

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