Help us shape the future of Go! Take the 2026 Go Developer Survey

deployconfig

package
v0.0.0-...-2fd5d2c Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package deployconfig handles reading Celerity app deploy configuration and converting it to the Bluelink deploy configuration format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRemoteEngine

func IsRemoteEngine(confProvider *config.Provider) bool

IsRemoteEngine reports whether the deploy engine the CLI will talk to runs outside the user's local filesystem and so cannot read files the CLI has written to disk. Callers use this to decide whether filesystem paths must be replaced with remote URLs, for uploaded build manifests and artifact buckets.

"Remote" requires both a tcp connect-protocol and a non-loopback endpoint host. A tcp connection to localhost/127.0.0.1/::1 is still a local engine for filesystem-sharing purposes.

func WriteBluelinkConfig

func WriteBluelinkConfig(path string, cfg *BluelinkDeployConfig) error

WriteBluelinkConfig writes a Bluelink deploy config to a file.

Types

type AppDeployConfig

type AppDeployConfig struct {
	// AppName is the project name. It is a first-class authoring item used for
	// resource naming and configuration-store paths (e.g. the SSM path prefix
	// "/celerity/<appName>/<configName>"). It is surfaced to the transform as
	// the "celerity.appName" context variable.
	AppName string `json:"appName"`
	// DeployTarget holds the target environment and its configuration.
	DeployTarget DeployTarget `json:"deployTarget"`
	// ContextVariables are additional context variables passed to the deploy engine.
	ContextVariables map[string]any `json:"contextVariables,omitempty"`
	// BlueprintVariables are blueprint variable overrides.
	BlueprintVariables map[string]any `json:"blueprintVariables,omitempty"`
	// HandlerBuild describes how to build the handlers executable for an OS-only
	// runtime, where the application is in a language the CLI has no toolchain
	// of its own for.
	//
	// This is not forwarded to the deploy engine. ConvertToBluelinkFormat
	// builds its output field by field, and this one describes a local build
	// step rather than anything the engine acts on.
	HandlerBuild *handlertoolchain.Config `json:"handlerBuild,omitempty"`
}

AppDeployConfig represents the structure of app.deploy.jsonc.

func ReadAppDeployConfig

func ReadAppDeployConfig(path string) (*AppDeployConfig, error)

ReadAppDeployConfig reads and parses an app deploy config file. Supports JSONC (strips comments before parsing).

type BluelinkDeployConfig

type BluelinkDeployConfig struct {
	Providers          map[string]map[string]any `json:"providers,omitempty"`
	Transformers       map[string]map[string]any `json:"transformers,omitempty"`
	ContextVariables   map[string]any            `json:"contextVariables,omitempty"`
	BlueprintVariables map[string]any            `json:"blueprintVariables,omitempty"`
	Dependencies       map[string]string         `json:"dependencies,omitempty"`
}

BluelinkDeployConfig is the Bluelink deploy configuration format expected by the deploy engine.

func ConvertToBluelinkFormat

func ConvertToBluelinkFormat(cfg *AppDeployConfig) (*BluelinkDeployConfig, error)

ConvertToBluelinkFormat converts an app deploy config to the Bluelink deploy configuration format expected by the deploy engine.

type CelerityPreCommandStep

type CelerityPreCommandStep struct{}

CelerityPreCommandStep reads the app deploy config, converts it to Bluelink format, optionally runs a build, and sets the deployConfigFile config key so the SDK commands use it.

func (*CelerityPreCommandStep) Run

func (s *CelerityPreCommandStep) Run(
	ctx context.Context,
	confProvider *config.Provider,
	commandName string,
	progress chan<- precommand.ProgressMsg,
) error

type DeployTarget

type DeployTarget struct {
	Name   string         `json:"name"`
	AppEnv string         `json:"appEnv,omitempty"`
	Config map[string]any `json:"config,omitempty"`
}

DeployTarget holds the target environment and its configuration.

Jump to

Keyboard shortcuts

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