Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicEnvironment ¶
type DynamicEnvironment struct { Name string `json:"name"` Template string `json:"template"` Overrides map[string]*Override `json:"overrides"` Hybrid bool `json:"hybrid"` // Deprecated / temporary (while we run bees in hybrid mode) Fiab Fiab `json:"fiab"` // Deprecated / temporary (while we run bees in hybrid mode) TerraHelmfileRef string `json:"terraHelmfileRef"` BuildNumber int `json:"buildNumber"` }
DynamicEnvironment is a struct representing a dynamic environment in the state file
func (DynamicEnvironment) MarshalJSON ¶ added in v0.0.35
func (e DynamicEnvironment) MarshalJSON() ([]byte, error)
func (*DynamicEnvironment) UnmarshalJSON ¶ added in v0.0.35
func (e *DynamicEnvironment) UnmarshalJSON(data []byte) error
type Override ¶ added in v0.0.35
type Override struct { Enabled *bool `json:"enabled,omitempty" yaml:",omitempty"` Versions terra.VersionOverride `json:"versions,omitempty" yaml:",omitempty"` }
Override represents configuration overrides for a release in an environment
func (*Override) HasEnableOverride ¶ added in v0.0.35
func (*Override) PinVersions ¶ added in v0.0.35
func (o *Override) PinVersions(versions terra.VersionOverride)
PinVersions applies the given VersionOverride to this override, ignoring empty fields in the parameter
func (*Override) UnpinVersions ¶ added in v0.0.35
func (o *Override) UnpinVersions()
UnpinVersions removes all version overrides
type StateBucket ¶
type StateBucket interface { // Environments returns the list of all environments in the state file Environments() ([]DynamicEnvironment, error) // Add adds a new environment to the state file Add(environment DynamicEnvironment) error // EnableRelease enables the given release in the target environment EnableRelease(environmentName string, releaseName string) error // DisableRelease disables the given release in the target environment DisableRelease(environmentName string, releaseName string) error // PinVersions can be used to update the environment's map of version overrides PinVersions(environmentName string, versions map[string]terra.VersionOverride) (map[string]terra.VersionOverride, error) // UnpinVersions can be used to remove the environment's map of version overrides UnpinVersions(environmentName string) (map[string]terra.VersionOverride, error) // PinEnvironmentToTerraHelmfileRef pins an entire environment to a specific terra-helmfile ref PinEnvironmentToTerraHelmfileRef(environmentName string, terraHelmfileRef string) error // SetBuildNumber sets the number for the currently-running build, returning the previous value SetBuildNumber(environmentName string, buildNumber int) (int, error) // UnsetBuildNumber unsets the build number in an environment (i.e. sets it to zero) UnsetBuildNumber(environmentName string) (int, error) // Delete will delete an environment from the state file Delete(environmentName string) error // contains filtered or unexported methods }
StateBucket is for tracking state for dynamic environments. (Stored in a GCS bucket)
func New ¶
func New(thelmaConfig config.Config, bucketFactory api.BucketFactory) (StateBucket, error)
New returns a new statebucket
func NewFake ¶
func NewFake(dir string) (StateBucket, error)
NewFake (FOR USE IN TESTS ONLY) returns a new fake statebucket, backed by local filesystem instead of a GCS bucket
type StateFile ¶
type StateFile struct { SchemaVersion int32 `json:"schemaVersion"` Environments map[string]DynamicEnvironment `json:"environments"` }
StateFile represents the structure of the statefile
Click to show internal directories.
Click to hide internal directories.