context

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagKeyProjectName = "projectName"
	TagKeyRunID       = "runid"
)

Variables

View Source
var (
	// mapt image to make self use. OCI image value is passed during building time
	// this is intended for full build process, when building mapt binary we need to ensure
	// OCI image already exists to make use of it
	OCI = "quay.io/redhat-developer/mapt:v0.0.0-unset"
)

Functions

func BackedURL

func BackedURL() string

func CreateRunID

func CreateRunID() string

It will create a runID if context has been intialized it will set it as the runID for the context otherwise it will return the value (one time value)

func Debug added in v0.7.4

func Debug() bool

func DebugLevel added in v0.7.4

func DebugLevel() uint

func GetResultsOutputPath

func GetResultsOutputPath() string

func GetTags

func GetTags() map[string]string

func Init

func Init(ca *ContextArgs) error

func IsServerless added in v0.8.0

func IsServerless() bool

func ProjectName

func ProjectName() string

func ResourceTags

func ResourceTags() pulumi.StringMap

func ResourceTagsWithCustom

func ResourceTagsWithCustom(customTags map[string]string) pulumi.StringMap

Get tags ready to be added to any pulumi resource in addition we cas set specific custom tags

func RunID

func RunID() string

func SetProjectName added in v0.8.0

func SetProjectName(projectName string)

func StackNameByProject

func StackNameByProject(stackName string) string

Types

type ContextArgs added in v0.8.0

type ContextArgs struct {
	ProjectName   string
	BackedURL     string
	ResultsOutput string
	Debug         bool
	DebugLevel    uint
	Tags          map[string]string
	// serverless here is used to set the credentials based on
	// roles inherid by tasks as serverless
	// see SetAWSCredentials function
	// take into account that the name may change as the approach to get
	// credentials from role is more general approach
	Serverless bool
	// integrations
	GHRunnerArgs *github.GithubRunnerArgs
	CirrusPWArgs *cirrus.PersistentWorkerArgs
}

Jump to

Keyboard shortcuts

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