runner

package
v0.53.0-devel Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Package runner implements local and ci profile runners

Index

Constants

View Source
const (
	// AgentAPIKey pulumi config paramater name
	AgentAPIKey = commonconfig.DDAgentConfigNamespace + ":" + commonconfig.DDAgentAPIKeyParamName
	// AgentAPPKey pulumi config paramater name
	AgentAPPKey = commonconfig.DDAgentConfigNamespace + ":" + commonconfig.DDAgentAPPKeyParamName
	// AgentPipelineID pulumi config parameter name
	AgentPipelineID = commonconfig.DDAgentConfigNamespace + ":" + commonconfig.DDAgentPipelineID
	// AgentCommitSHA pulumi config parameter name
	AgentCommitSHA = commonconfig.DDAgentConfigNamespace + ":" + commonconfig.DDAgentCommitSHA

	// InfraEnvironmentVariables pulumi config paramater name
	InfraEnvironmentVariables = commonconfig.DDInfraConfigNamespace + ":" + commonconfig.DDInfraEnvironment

	// InfraExtraResourcesTags pulumi config paramater name
	InfraExtraResourcesTags = commonconfig.DDInfraConfigNamespace + ":" + commonconfig.DDInfraExtraResourcesTags

	// AWSKeyPairName pulumi config paramater name
	AWSKeyPairName = commonconfig.DDInfraConfigNamespace + ":" + infraaws.DDInfraDefaultKeyPairParamName
	// AWSPublicKeyPath pulumi config paramater name
	AWSPublicKeyPath = commonconfig.DDInfraConfigNamespace + ":" + infraaws.DDinfraDefaultPublicKeyPath
	// AWSPrivateKeyPath pulumi config paramater name
	AWSPrivateKeyPath = commonconfig.DDInfraConfigNamespace + ":" + infraaws.DDInfraDefaultPrivateKeyPath
	// AWSPrivateKeyPassword pulumi config paramater name
	AWSPrivateKeyPassword = commonconfig.DDInfraConfigNamespace + ":" + infraaws.DDInfraDefaultPrivateKeyPassword
)

Variables

This section is empty.

Functions

func GetTestOutputDir added in v0.52.0

func GetTestOutputDir(p Profile, t *testing.T) (string, error)

GetTestOutputDir returns the output directory for a specific test. The test name is sanitized to remove invalid characters, and the output directory is created.

func SetConfigMapFromParameter

func SetConfigMapFromParameter(store parameters.Store, cm ConfigMap, paramName parameters.StoreKey, configMapKey string) error

SetConfigMapFromParameter set config map from a parameter store

func SetConfigMapFromSecret

func SetConfigMapFromSecret(secretStore parameters.Store, cm ConfigMap, paramName parameters.StoreKey, configMapKey string) error

SetConfigMapFromSecret set config map from a secret store

Types

type CloudProvider

type CloudProvider string

CloudProvider alias to string

const (
	// AWS cloud provider
	AWS CloudProvider = "aws"
	// Azure cloud provider
	Azure CloudProvider = "az"
	// GCP cloud provider
	GCP CloudProvider = "gcp"
	// EnvPrefix prefix for e2e environment variables
	EnvPrefix = "E2E_"
)

type ConfigMap

type ConfigMap auto.ConfigMap

ConfigMap type alias to auto.ConfigMap

func BuildStackParameters

func BuildStackParameters(profile Profile, scenarioConfig ConfigMap) (ConfigMap, error)

BuildStackParameters creates a config map from a profile, a scenario config map and env/cli configuration parameters

func (ConfigMap) Merge

func (cm ConfigMap) Merge(in ConfigMap)

Merge in ConfigMap into current config map

func (ConfigMap) Set

func (cm ConfigMap) Set(key, val string, secret bool)

Set a value by key in a config map

func (ConfigMap) ToPulumi

func (cm ConfigMap) ToPulumi() auto.ConfigMap

ToPulumi casts current config map to a Pulumi auto.ConfigMap

type Profile

type Profile interface {
	// EnvironmentName returns the environment names for cloud providers
	EnvironmentNames() string
	// ProjectName used by Pulumi
	ProjectName() string
	// GetWorkspacePath returns the directory for local Pulumi workspace.
	// Since one Workspace supports one single program and we have one program per stack,
	// the path should be unique for each stack.
	GetWorkspacePath(stackName string) string
	// ParamStore() returns the normal parameter store
	ParamStore() parameters.Store
	// SecretStore returns the secure parameter store
	SecretStore() parameters.Store
	// NamePrefix returns a prefix to name objects
	NamePrefix() string
	// AllowDevMode returns if DevMode is allowed
	AllowDevMode() bool
	// GetOutputDir returns the root output directory for tests to store output files and artifacts.
	// e.g. /tmp/e2e-output/2020-01-01_00-00-00_<random>
	//
	// See GetTestOutputDir for a function that returns a subdirectory for a specific test.
	GetOutputDir() (string, error)
}

Profile interface defines functions required by a profile

func GetProfile

func GetProfile() Profile

GetProfile return a profile initialising it at first call

func NewCIProfile

func NewCIProfile() (Profile, error)

NewCIProfile creates a new CI profile

func NewLocalProfile

func NewLocalProfile() (Profile, error)

NewLocalProfile creates a new local profile

Directories

Path Synopsis
Package parameters implements parameters for profiles
Package parameters implements parameters for profiles

Jump to

Keyboard shortcuts

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