dynatrace

package
v0.44.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProductionDir = "terraform/redhat-aws/sd-sre/production"
)

Variables

View Source
var (
	ServicesSlice    []string
	ServicesFilesMap = map[string]string{}
	ModulesSlice     []string
	ModulesFilesMap  = map[string]string{}
)
View Source
var (
	BaseDir string
)

Functions

func CheckoutAndCompareGitHash

func CheckoutAndCompareGitHash(appInterface AppInterface, gitURL, gitHash, currentGitHash, serviceFullPath string) (string, string, error)

func DefaultAppInterfaceDirectory

func DefaultAppInterfaceDirectory() string

func DefaultDynatraceconfigDir

func DefaultDynatraceconfigDir() string

func GeModulesNames

func GeModulesNames(baseDir, dir string) ([]string, error)

func GetCurrentGitHashFromAppInterface

func GetCurrentGitHashFromAppInterface(saarYamlFile []byte, serviceName string) (string, string, string, error)

func GetProductionDir

func GetProductionDir(baseDir string) string

func GetSaasDir

func GetSaasDir(component string) (string, error)

func GetServiceNames

func GetServiceNames(appInterface AppInterface, saaDirs ...string) ([]string, error)

func NewCmdDynatrace

func NewCmdDynatrace() *cobra.Command

NewCmdPromote implements the promote command to promote services/operators

func Open

func Open(filepath string) (*hclwrite.File, error)

func Save

func Save(filename string, file *hclwrite.File) error

func UpdateDefaultValue

func UpdateDefaultValue(file *hclwrite.File, name string, value string) bool

func ValidateModuleName

func ValidateModuleName(moduleName string) (string, error)

func ValidateServiceName

func ValidateServiceName(serviceSlice []string, serviceName string) (string, error)

Types

type AppInterface

type AppInterface struct {
	GitDirectory string
	GitExecutor  iexec.IExec
}

func BootstrapOsdCtlForAppInterfaceAndServicePromotions

func BootstrapOsdCtlForAppInterfaceAndServicePromotions(appInterfaceCheckoutDir string) AppInterface

func (AppInterface) CommitSaasFile

func (a AppInterface) CommitSaasFile(saasFile, commitMessage string) error

func (AppInterface) UpdateAppInterface

func (a AppInterface) UpdateAppInterface(component, saasFile, currentGitHash, promotionGitHash, branchName string) error

func (AppInterface) UpdatePackageTag

func (a AppInterface) UpdatePackageTag(saasFile, oldTag, promotionTag, branchName string) error

type DynatraceConfig

type DynatraceConfig struct {
	GitDirectory string
	GitExecutor  iexec.IExec
}

func DynatraceConfigPromotion

func DynatraceConfigPromotion(dynatraceConfigCheckoutDir string) DynatraceConfig

func (DynatraceConfig) UpdateDynatraceConfig

func (a DynatraceConfig) UpdateDynatraceConfig(component, promotionGitHash, branchName string) error

type Service

type Service struct {
	Name              string `yaml:"name"`
	ResourceTemplates []struct {
		Name    string `yaml:"name"`
		URL     string `yaml:"url"`
		PATH    string `yaml:"path"`
		Targets []struct {
			Name       string
			Namespace  map[string]string      `yaml:"namespace"`
			Ref        string                 `yaml:"ref"`
			Parameters map[string]interface{} `yaml:"parameters"`
		} `yaml:"targets"`
	} `yaml:"resourceTemplates"`
}

Jump to

Keyboard shortcuts

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