exec

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTerraformWorkspace added in v1.4.8

func BuildTerraformWorkspace(
	stack string,
	stackNamePattern string,
	componentMetadata map[any]any,
	context cfg.Context,
) (string, error)

BuildTerraformWorkspace builds Terraform workspace

func ExecuteAtlantisGenerateRepoConfig added in v1.5.0

func ExecuteAtlantisGenerateRepoConfig(
	cliConfig cfg.CliConfiguration,
	outputPath string,
	configTemplateName string,
	projectTemplateName string,
	workflowTemplateName string,
	stacks []string,
	components []string) error

ExecuteAtlantisGenerateRepoConfig generates repository configuration for Atlantis

func ExecuteAtlantisGenerateRepoConfigCmd added in v1.5.0

func ExecuteAtlantisGenerateRepoConfigCmd(cmd *cobra.Command, args []string) error

ExecuteAtlantisGenerateRepoConfigCmd executes `atlantis generate repo-config` command

func ExecuteAwsEksUpdateKubeconfig added in v1.4.9

func ExecuteAwsEksUpdateKubeconfig(kubeconfigContext cfg.AwsEksUpdateKubeconfigContext) error

ExecuteAwsEksUpdateKubeconfig executes 'aws eks update-kubeconfig' https://docs.aws.amazon.com/cli/latest/reference/eks/update-kubeconfig.html

func ExecuteAwsEksUpdateKubeconfigCommand added in v1.4.9

func ExecuteAwsEksUpdateKubeconfigCommand(cmd *cobra.Command, args []string) error

func ExecuteComponentVendorCommandInternal added in v1.4.12

func ExecuteComponentVendorCommandInternal(
	vendorComponentSpec cfg.VendorComponentSpec,
	component string,
	componentPath string,
	dryRun bool,
	vendorCommand string,
) error

ExecuteComponentVendorCommandInternal executes a component vendor command Supports all protocols (local files, Git, Mercurial, HTTP, HTTPS, Amazon S3, Google GCP), URL and archive formats described in https://github.com/hashicorp/go-getter https://www.allee.xyz/en/posts/getting-started-with-go-getter https://github.com/otiai10/copy

func ExecuteDescribeComponent

func ExecuteDescribeComponent(cmd *cobra.Command, args []string) error

ExecuteDescribeComponent executes `describe component` command

func ExecuteDescribeConfig added in v1.3.4

func ExecuteDescribeConfig(cmd *cobra.Command, args []string) error

ExecuteDescribeConfig executes `describe config` command

func ExecuteDescribeStacks added in v1.4.4

func ExecuteDescribeStacks(cmd *cobra.Command, args []string) error

ExecuteDescribeStacks executes `describe stacks` command

func ExecuteHelmfile

func ExecuteHelmfile(cmd *cobra.Command, args []string) error

ExecuteHelmfile executes helmfile commands

func ExecuteHelmfileGenerateVarfile added in v1.3.30

func ExecuteHelmfileGenerateVarfile(cmd *cobra.Command, args []string) error

ExecuteHelmfileGenerateVarfile executes `helmfile generate varfile` command

func ExecuteShellCommand added in v1.4.9

func ExecuteShellCommand(command string, args []string, dir string, env []string, dryRun bool) error

ExecuteShellCommand prints and executes the provided command with args and flags

func ExecuteShellCommandAndReturnOutput added in v1.4.22

func ExecuteShellCommandAndReturnOutput(command string, args []string, dir string, env []string, dryRun bool) (string, error)

ExecuteShellCommandAndReturnOutput prints and executes the provided command with args and flags and returns the command output

func ExecuteShellCommands added in v1.4.22

func ExecuteShellCommands(commands []string, dir string, env []string, dryRun bool) error

ExecuteShellCommands sequentially executes the provided list of commands

func ExecuteStackVendorCommandInternal added in v1.4.12

func ExecuteStackVendorCommandInternal(
	stack string,
	dryRun bool,
	vendorCommand string,
) error

ExecuteStackVendorCommandInternal executes a stack vendor command TODO: implement this

func ExecuteTerraform

func ExecuteTerraform(cmd *cobra.Command, args []string) error

ExecuteTerraform executes terraform commands

func ExecuteTerraformGenerateBackend

func ExecuteTerraformGenerateBackend(cmd *cobra.Command, args []string) error

ExecuteTerraformGenerateBackend executes `terraform generate backend` command

func ExecuteTerraformGenerateBackends

func ExecuteTerraformGenerateBackends(cliConfig cfg.CliConfiguration, format string) error

ExecuteTerraformGenerateBackends generates backend configs for all terraform components

func ExecuteTerraformGenerateBackendsCmd added in v1.7.0

func ExecuteTerraformGenerateBackendsCmd(cmd *cobra.Command, args []string) error

ExecuteTerraformGenerateBackendsCmd executes `terraform generate backends` command

func ExecuteTerraformGenerateVarfile added in v1.3.30

func ExecuteTerraformGenerateVarfile(cmd *cobra.Command, args []string) error

ExecuteTerraformGenerateVarfile executes `terraform generate varfile` command

func ExecuteTerraformGenerateVarfiles added in v1.5.0

func ExecuteTerraformGenerateVarfiles(cliConfig cfg.CliConfiguration, fileTemplate string, format string, stacks []string, components []string) error

ExecuteTerraformGenerateVarfiles generates varfiles for all terraform components in all stacks

func ExecuteTerraformGenerateVarfilesCmd added in v1.5.0

func ExecuteTerraformGenerateVarfilesCmd(cmd *cobra.Command, args []string) error

ExecuteTerraformGenerateVarfilesCmd executes `terraform generate varfiles` command

func ExecuteValidateComponent added in v1.9.0

func ExecuteValidateComponent(cliConfig cfg.CliConfiguration, componentName string, stack string, schemaPath string, schemaType string) (bool, error)

ExecuteValidateComponent validates a component in a stack using JsonSchema, OPA or CUE schema documents

func ExecuteValidateComponentCmd added in v1.9.0

func ExecuteValidateComponentCmd(cmd *cobra.Command, args []string) error

ExecuteValidateComponentCmd executes `validate component` command

func ExecuteValidateStacks added in v1.4.13

func ExecuteValidateStacks(cmd *cobra.Command, args []string) error

ExecuteValidateStacks executes `validate stacks` command

func ExecuteVendorCommand added in v1.4.12

func ExecuteVendorCommand(cmd *cobra.Command, args []string, vendorCommand string) error

ExecuteVendorCommand executes `atmos vendor` commands

func ExecuteVendorDiff added in v1.4.12

func ExecuteVendorDiff(cmd *cobra.Command, args []string) error

ExecuteVendorDiff executes `vendor diff` commands

func ExecuteVendorPull added in v1.4.12

func ExecuteVendorPull(cmd *cobra.Command, args []string) error

ExecuteVendorPull executes `vendor pull` commands

func ExecuteWorkflow added in v1.4.0

func ExecuteWorkflow(cmd *cobra.Command, args []string) error

ExecuteWorkflow executes a workflow

func FindComponentConfig added in v1.3.28

func FindComponentConfig(
	stack string,
	stacksMap map[string]any,
	componentType string,
	component string,
) (map[string]any,
	map[any]any,
	map[any]any,
	map[any]any,
	string,
	string,
	string,
	[]string,
	bool,
	map[any]any,
	error,
)

FindComponentConfig finds component config sections

func FindStacksMap added in v1.4.4

func FindStacksMap(cliConfig cfg.CliConfiguration) (map[string]any, error)

FindStacksMap processes stack config and returns a map of all stacks

func FindValidationSection added in v1.9.0

func FindValidationSection(componentSection map[string]any) (cfg.Validation, error)

FindValidationSection finds 'validation' section in the component config

func ProcessComponentMetadata added in v1.8.0

func ProcessComponentMetadata(
	component string,
	componentSection map[string]any,
) (map[any]any, string, bool)

ProcessComponentMetadata processes component metadata and returns a base component (if any) and whether the component is real or abstract

func ProcessStacks added in v1.3.28

func ProcessStacks(cliConfig cfg.CliConfiguration, configAndStacksInfo cfg.ConfigAndStacksInfo, checkStack bool) (cfg.ConfigAndStacksInfo, error)

ProcessStacks processes stack config

func ReadAndProcessComponentConfigFile added in v1.4.12

func ReadAndProcessComponentConfigFile(cliConfig cfg.CliConfiguration, component string, componentType string) (cfg.VendorComponentConfig, string, error)

ReadAndProcessComponentConfigFile reads and processes `component.yaml` vendor config file

func ValidateComponent added in v1.9.0

func ValidateComponent(cliConfig cfg.CliConfiguration, componentName string, componentSection any, schemaPath string, schemaType string) (bool, error)

ValidateComponent validates the component config using JsonSchema, OPA or CUE schema documents

func ValidateWithCue added in v1.9.0

func ValidateWithCue(data any, schemaName string, schemaText string) (bool, error)

ValidateWithCue validates the data structure using the provided CUE document https://cuelang.org/docs/integrations/go/#processing-cue-in-go

func ValidateWithJsonSchema added in v1.9.0

func ValidateWithJsonSchema(data any, schemaName string, schemaText string) (bool, error)

ValidateWithJsonSchema validates the data structure using the provided JSON Schema document https://github.com/santhosh-tekuri/jsonschema https://go.dev/play/p/Hhax3MrtD8r

func ValidateWithOpa added in v1.9.0

func ValidateWithOpa(data any, schemaName string, schemaText string) (bool, error)

ValidateWithOpa validates the data structure using the provided OPA document https://www.openpolicyagent.org/docs/latest/integration/#sdk

Types

This section is empty.

Jump to

Keyboard shortcuts

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