deploy

package
v0.55.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 23 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 EnvironmentCheckResult added in v0.55.0

type EnvironmentCheckResult struct {
	UseApplicationsCore bool
	ApplicationsCoreEnv *v20231001preview.EnvironmentResource
	RadiusCoreEnv       *v20250801preview.EnvironmentResource
}

EnvironmentCheckResult holds the result of checking for environments

type Runner

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

	ApplicationName          string
	EnvironmentNameOrID      string
	FilePath                 string
	Parameters               map[string]map[string]any
	Template                 map[string]any
	TemplateInspectionResult bicep.TemplateInspectionResult
	Workspace                *workspaces.Workspace
	Providers                *clients.Providers
	EnvResult                *EnvironmentCheckResult
}

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) FetchEnvironment added in v0.55.0

func (r *Runner) FetchEnvironment(ctx context.Context, envNameOrID string) (*EnvironmentCheckResult, error)

FetchEnvironment fetches Applications.Core and Radius.Core environments for a given name/id and returns the result If no environment is found, returns (nil, nil)

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