Documentation ¶
Index ¶
- Constants
- func DependencyNeedsResolvingError(dependencyReleaseId string) error
- func ExpectingStringKeyInMapError(field string, val interface{}) error
- func ExpectingTypeForDependencyFieldError(typ, field string, val interface{}) error
- func ExpectingTypeForExecStageError(typ, field string, val interface{}) error
- func RelativeScriptOutsideOfBaseDirError(script string) error
- func ScriptDoesNotExistError(script, str string) error
- func ValidateProjectName(name string) error
- type Change
- type Changes
- type ConsumerConfig
- type Dependency
- type DependencyConfig
- func (d *DependencyConfig) AddVariableMapping(scopes []string, id, key string)
- func (d *DependencyConfig) Copy() *DependencyConfig
- func (d *DependencyConfig) EnsureConfigIsParsed() error
- func (d *DependencyConfig) GetMapping(scope string) map[string]interface{}
- func (d *DependencyConfig) GetVersionAsString() (version string)
- func (d *DependencyConfig) InScope(scope string) bool
- func (d *DependencyConfig) NeedsResolving() bool
- func (d *DependencyConfig) Resolve(m *ReleaseMetadata) *ResolvedDependencyConfig
- func (d *DependencyConfig) Validate(m *ReleaseMetadata) error
- type DownloadConfig
- type Errand
- type ExecStage
- type ExtensionConfig
- type ProviderConfig
- type ReleaseMetadata
- func (m *ReleaseMetadata) AddConsumes(c *ConsumerConfig)
- func (m *ReleaseMetadata) AddDependency(dep *DependencyConfig)
- func (m *ReleaseMetadata) AddDependencyFromString(dep string)
- func (m *ReleaseMetadata) AddExtension(releaseId string)
- func (m *ReleaseMetadata) AddFileWithDigest(path, hexDigest string)
- func (m *ReleaseMetadata) AddGlobPatternToGenerates(globPattern string)
- func (m *ReleaseMetadata) AddInputVariable(input *variables.Variable)
- func (m *ReleaseMetadata) AddOutputVariable(output *variables.Variable)
- func (m *ReleaseMetadata) AddProvides(p string)
- func (m *ReleaseMetadata) GetConsumerConfig(stage string) []*ConsumerConfig
- func (m *ReleaseMetadata) GetConsumes(stage string) []string
- func (m *ReleaseMetadata) GetDirectories() []string
- func (m *ReleaseMetadata) GetDownloads(stage string) []*DownloadConfig
- func (m *ReleaseMetadata) GetErrands() map[string]*Errand
- func (m *ReleaseMetadata) GetExecStage(stage string) *ExecStage
- func (m *ReleaseMetadata) GetExtensions() []string
- func (m *ReleaseMetadata) GetInputs(stage string) []*variables.Variable
- func (m *ReleaseMetadata) GetInputsInScopes(stages []string) []*variables.Variable
- func (m *ReleaseMetadata) GetOutputs(stage string) []*variables.Variable
- func (m *ReleaseMetadata) GetProject() string
- func (m *ReleaseMetadata) GetProvides() []string
- func (m *ReleaseMetadata) GetQualifiedReleaseId() string
- func (m *ReleaseMetadata) GetReleaseId() string
- func (m *ReleaseMetadata) GetStage(stage string) *ExecStage
- func (m *ReleaseMetadata) GetTemplates(stage string) []*templates.Template
- func (m *ReleaseMetadata) GetVersionlessReleaseId() string
- func (m *ReleaseMetadata) SetConsumes(c []string)
- func (m *ReleaseMetadata) SetDependencies(deps []string)
- func (m *ReleaseMetadata) SetExecStage(stage string, exec *ExecStage)
- func (m *ReleaseMetadata) SetProvides(p []string)
- func (m *ReleaseMetadata) ToDependency() *Dependency
- func (m *ReleaseMetadata) ToDict() (map[string]interface{}, error)
- func (m *ReleaseMetadata) ToJson() string
- func (m *ReleaseMetadata) ToScript() script.Script
- func (m *ReleaseMetadata) ToScriptMap() map[string]script.Script
- func (m *ReleaseMetadata) Validate() error
- func (m *ReleaseMetadata) WriteJsonFile(path string) error
- type ResolvedDependencyConfig
- type SemanticVersion
Constants ¶
const CoreVersion = "0.15.1"
const CurrentApiVersion = 15
Variables ¶
This section is empty.
Functions ¶
func ScriptDoesNotExistError ¶
func ValidateProjectName ¶
Types ¶
type Change ¶
type Change struct { Path []string PreviousValue interface{} NewValue interface{} Added bool Removed bool }
func NewAddition ¶
func NewRemoval ¶
func (Change) GetModification ¶
type Changes ¶
type Changes []Change
func Diff ¶
func Diff(this *ReleaseMetadata, other *ReleaseMetadata) Changes
type ConsumerConfig ¶
type ConsumerConfig struct { // The name of the interface. Can be renamed using the `as` syntax. // For example: `kubernetes as k8s`, `postgres`, `postgres as db` Name string `json:"name" yaml:"name"` // A list of scopes (`build`, `deploy`) that defines during which stage(s) // this dependency should be fetched and deployed. Also see // [`build_consumes`](/docs/reference/escape-plan/#build_consumes] and // [`deploy_consumes`](/docs/reference/escape-plan/#deploy_consumes]. Scopes scopes.Scopes `json:"scopes" yaml:"scopes"` // The variable used to reference this consumer. Overwriting this field in // the Escape plan has no effect. VariableName string `json:"variable" yaml:"variable"` // Skips the provider's activation step. SkipActivate bool `json:"skip_activate" yaml:"skip_activate"` // Skips the provider's deactivation step. Only relevant when // `skip_activate` is false. SkipDeactivate bool `json:"skip_deactivate" yaml:"skip_deactivate"` }
Unlike Dependencies, which are resolved at build time and provide tight coupling, we can use Consumers and Providers to resolve and loosely couple packages at deployment time. Providers make their output variables available to each consumer, making it possible to share credentials and host details for example. Providers and Consumers are often used to model the different layers in an architecture; where the layer below is consumed by the layer on top (e.g. AWS -> Kubernetes -> Helm -> Service).
To signal that a package implements a certain interface, e.g. "my-interface", we can define it as a provider in the Escape plan:
```yaml provides: - my-interface ```
Packages that require a "my-interface" define this joyful fact in their Escape Plan as well:
```yaml consumes: - my-interface ```
When building or deploying the consumer Escape now makes sure that it also has access to a provider's output variables. You can only link consumers to providers in the same environment. Escape will link up consumers with providers automatically if there's only a single provider of a particular interface; other times providers need to be specified with the `-p` flag. For example:
``` escape run deploy my-project/my-consumer-v1.0.0 -p my-interface=provider-deployment ```
To list providers in an environment you can use the [`escape state show-providers`](/docs/reference/escape_state_show-providers/) command.
## Wrapper Packages
Providers and consumers provide a loose coupling, but sometimes we know exactly what provider implementation we want to use. In this case we can create a wrapper release that uses one dependency as the provider for the next:
```yaml depends:
- release_id: my-project/postgres-provider-latest as postgres
- release_id: my-project/my-application-latest consumes: postgres: $postgres.deployment
```
To read more about wrapper releases see the [blog post](https://www.ankyra.io/blog/combining-packages-into-platforms/).
## Provider Activation and Deactivation
When a package consumes another package as a provider, the provider has the ability to run activation and deactivation scripts. The scripts can be defined by adding the following fields to the Escape plan:
```yaml activate_provider: activate.sh deactivate_provider: deactivate.sh ```
The scripts gets full access to the provider's deployment state and is in that way similar to running a smoke test. These steps are often used to activate credentials, install packages, or otherwise manage state on the deployment machine or container.
To disable activation and deactivation see the `skip_activate` and `skip_deactivate` options on the consumer configuration below.
## Escape Plan
Consumers are configured in the [`consumes`](/docs/reference/escape-plan/#consumes) field of the Escape Plan.
Providers are configured in the [`provides`](/docs/reference/escape-plan/#provides) field of the Escape Plan.
func NewConsumerConfig ¶
func NewConsumerConfig(name string) *ConsumerConfig
Only used for testing purposes.
func NewConsumerConfigFromInterface ¶
func NewConsumerConfigFromInterface(v interface{}) (*ConsumerConfig, error)
func NewConsumerConfigFromMap ¶
func NewConsumerConfigFromMap(dep map[interface{}]interface{}) (*ConsumerConfig, error)
func NewConsumerConfigFromString ¶
func NewConsumerConfigFromString(str string) (*ConsumerConfig, error)
func (*ConsumerConfig) Copy ¶
func (c *ConsumerConfig) Copy() *ConsumerConfig
func (*ConsumerConfig) InScope ¶
func (c *ConsumerConfig) InScope(scope string) bool
func (*ConsumerConfig) ValidateAndFix ¶
func (c *ConsumerConfig) ValidateAndFix() error
type Dependency ¶
func NewDependencyFromMetadata ¶
func NewDependencyFromMetadata(metadata *ReleaseMetadata) *Dependency
func NewDependencyFromQualifiedReleaseId ¶
func NewDependencyFromQualifiedReleaseId(r *parsers.QualifiedReleaseId) *Dependency
func NewDependencyFromString ¶
func NewDependencyFromString(str string) (*Dependency, error)
func (*Dependency) GetQualifiedReleaseId ¶
func (d *Dependency) GetQualifiedReleaseId() string
func (*Dependency) GetReleaseId ¶
func (d *Dependency) GetReleaseId() string
func (*Dependency) GetVersionAsString ¶
func (d *Dependency) GetVersionAsString() (version string)
func (*Dependency) GetVersionlessReleaseId ¶
func (d *Dependency) GetVersionlessReleaseId() string
func (*Dependency) NeedsResolving ¶
func (d *Dependency) NeedsResolving() bool
type DependencyConfig ¶
type DependencyConfig struct { // The release id is required and is resolved at *build* time and then // persisted in the release metadata ensuring that deployments always use // the same versions. // // Examples: // - To always use the latest version: `my-organisation/my-dependency-latest` // - To always use version 0.1.1: `my-organisation/my-dependency-v0.1.1` // - To always use the latest version in the 0.1 series: `my-organisation/my-dependency-v0.1.@` // - To make it possible to reference a dependency using a different name: `my-organisation/my-dependency-latest as my-name` ReleaseId string `json:"release_id" yaml:"release_id"` // Define the values of dependency inputs using Escape Script. Mapping map[string]interface{} `json:"mapping" yaml:"mapping"` // Define the values of dependency inputs using Escape Script when running // stages in the build scope. BuildMapping map[string]interface{} `json:"build_mapping" yaml:"build_mapping"` // Define the values of dependency inputs using Escape Script when running // stages in the deploy scope. DeployMapping map[string]interface{} `json:"deploy_mapping" yaml:"deploy_mapping"` // Map providers from the parent to dependencies. // // Example: // “` // consumes: // - my-provider // depends: // - release_id: my-org/my-dep-latest // consumes: // provider: $my-provider.deployment // “` Consumes map[string]string `json:"consumes" yaml:"consumes"` // The name of the (sub)-deployment. This defaults to the versionless release id; // e.g. if the release_id is `my-org/my-dep-v1.0` then the DeploymentName will be // `my-org/my-dep` by default. DeploymentName string `json:"deployment_name" yaml:"deployment_name"` // The variable used to reference this dependency. By default the variable // name is the versionless release id of the dependency, but this can be // overruled by renaming the dependency (e.g. `my-org/my-release-latest as // my-variable`. This field will be set automatically at build time. // Overwriting this field in the Escape plan has no effect. VariableName string `json:"variable" yaml:"variable"` // A list of scopes (`build`, `deploy`) that defines during which stage(s) // this dependency should be fetched and deployed. *Currently not implemented!* Scopes scopes.Scopes `json:"scopes" yaml:"scopes"` // Parsed out of the release ID. For example: when release id is // `"my-org/my-name-v1.0"` this value is `"my-org"`. Project string `json:"-" yaml:"-"` // Parsed out of the release ID. For example: when release id is // `"my-org/my-name-v1.0"` this value is `"my-name"`. Name string `json:"-" yaml:"-"` // Parsed out of the release ID. For example: when release id is // `"my-org/my-name-v1.0"` this value is `"1.0"`. Version string `json:"-" yaml:"-"` // Parsed out of the release ID. For example: when release id is // `"my-org/my-name:tag"` this value is `"tag"`. Tag string `json:"-" yaml:"-"` }
## Escape Plan
Dependencies are configured in the [`depends`](/docs/reference/escape-plan/#depends) field of the Escape plan.
func NewDependencyConfig ¶
func NewDependencyConfig(releaseId string) *DependencyConfig
func NewDependencyConfigFromMap ¶
func NewDependencyConfigFromMap(dep map[interface{}]interface{}) (*DependencyConfig, error)
func (*DependencyConfig) AddVariableMapping ¶
func (d *DependencyConfig) AddVariableMapping(scopes []string, id, key string)
func (*DependencyConfig) Copy ¶
func (d *DependencyConfig) Copy() *DependencyConfig
func (*DependencyConfig) EnsureConfigIsParsed ¶
func (d *DependencyConfig) EnsureConfigIsParsed() error
func (*DependencyConfig) GetMapping ¶
func (d *DependencyConfig) GetMapping(scope string) map[string]interface{}
func (*DependencyConfig) GetVersionAsString ¶
func (d *DependencyConfig) GetVersionAsString() (version string)
func (*DependencyConfig) InScope ¶
func (d *DependencyConfig) InScope(scope string) bool
func (*DependencyConfig) NeedsResolving ¶
func (d *DependencyConfig) NeedsResolving() bool
func (*DependencyConfig) Resolve ¶
func (d *DependencyConfig) Resolve(m *ReleaseMetadata) *ResolvedDependencyConfig
func (*DependencyConfig) Validate ¶
func (d *DependencyConfig) Validate(m *ReleaseMetadata) error
type DownloadConfig ¶
type DownloadConfig struct { // The URL to download from. This field is required. // // Example: `https://www.google.com/` URL string `json:"url"` // The destination path. Dest string `json:"dest"` // Overwrite the destination path if it already exists. OverwriteExistingDest bool `json:"overwrite" yaml:"overwrite"` // Only perform this download if none of the paths in this list exist. // Supports glob patterns (for example: `"*.zip"`) IfNotExists []string `json:"if_not_exists" yaml:"if_not_exists"` // Should Escape try and unpack the destination path after download? // Supported extensions: `.zip`, `.tgz`, `.tar.gz`, `.tar`. Unpack bool `json:"unpack"` // Only perform this download if the platform matches this value. // Can be used to do platform dependent builds. Platform string `json:"platform"` // Only perform this download if the architecture matches this string. // Can be used to do architecture dependent builds. Arch string `json:"arch"` // A list of scopes (`build`, `deploy`) that defines during which stage(s) // this download should be performed. Scopes []string `json:"scopes" yaml:"scopes"` }
Downloading files at build or deployment time is one of those common tasks that Escape tries to cover.
## Escape Plan
Downloads are configured in the Escape Plan under the [`downloads`](/docs/reference/escape-plan/#downloads) field.
func NewDownloadConfig ¶
func NewDownloadConfig(url string) *DownloadConfig
func (*DownloadConfig) InScope ¶
func (d *DownloadConfig) InScope(scope string) bool
func (*DownloadConfig) ValidateAndFix ¶
func (d *DownloadConfig) ValidateAndFix() error
type Errand ¶
type Errand struct { // The name of the errand. This field is required. Name string `json:"name"` // An optional description of the errand. Description string `json:"description"` // The script or command performing the errand (deprecated, use 'run' instead). // // The script has access to the deployment inputs and outputs as enviroment // variables. For example: an input with `"id": "input_variable"` will be // accessible as `INPUT_input_variable`; and an output with `"id": // "output_variable"` as `OUTPUT_output_variable`. Script string `json:"script"` // The script or command performing the errand. // // The command has access to the deployment inputs and outputs as // enviroment variables. For example: an input with `"id": // "input_variable"` will be accessible as `INPUT_input_variable`; and an // output with `"id": "output_variable"` as `OUTPUT_output_variable`. Run *ExecStage `json:"exec_stage"` // A list of [Variables](/docs/reference/input-and-output-variables/). The values // will be made available to the `script` (along with the regular // deployment inputs and outputs) as environment variables. For example: a // variable with `"id": "input_variable"` will be accessible as environment // variable `INPUT_input_variable` Inputs []*variables.Variable `json:"inputs"` }
Errands are an Escape mechanism that make it easy to run operational and publication tasks against deployed packages. They can be used to implement backup procedures, user management, scalability controls, binary publications, etc. Errands are a good idea whenever a task needs to be aware of Environments.
You can inspect and run Errands using the [`escape errands`](/docs/reference/escape_errands/) command.
## Escape Plan
Errands are configured in the Escape Plan under the [`errands`](/docs/reference/escape-plan/#errands) field.
func NewErrandFromDict ¶
type ExecStage ¶
type ExecStage struct { // The command to run. Its arguments, if any, should be defined using the // "args" field. Cmd string `json:"cmd,omitempty"` // Arguments to the command. Args []string `json:"args,omitempty"` // An inline script, which will be executed using sh. It's an error to // specify both the "cmd" and "inline" fields. Inline string `json:"inline,omitempty"` // Relative path to a script. If the "cmd" field is already populated // then this field will be ignored entirely. RelativeScript string `json:"script,omitempty"` }
func NewExecStageFromDict ¶
func NewExecStageFromString ¶
func (*ExecStage) Eval ¶
func (e *ExecStage) Eval(env *script.ScriptEnvironment) (*ExecStage, error)
func (*ExecStage) GetAsCommand ¶
func (*ExecStage) ValidateAndFix ¶
type ExtensionConfig ¶
type ExtensionConfig struct { // The release id is required and is resolved at *build* time and then // persisted in the release metadata ensuring that deployments always use // the same versions. ReleaseId string `json:"release_id"` }
A package can extend another package and inherit its build scripts and input and output variables. This makes it possible to reuse build and deployment patterns. To extend another package the `extends` field in the Escape plan can be used:
``` extends: - my-project/my-application-latest ```
This effectively copies the following fields from the extension to the package:
* `depends` * `consumes` * `provides` * `inputs` * `outputs` * `errands` * `metadata` * `templates` * `deploy`, `build`, `test`, `pre_deploy`, etc.
If both the parent release and the extension release define a particular input, output, or build/deployment script then the definition in the parent always wins. This allows you to override parts of the extension that need specialisation or changing.
## How do scripts get executed?
When executing a script defined in the extension, Escape will run the script in the parent's root directory. For example: if we have an extension:
``` name: my-extension version: 1.0
deploy: deploy.sh ```
And a package that uses that extension:
``` name: my-extender version: 1.0 extends: - my-extension-latest ```
Then `escape run deploy` for that package will execute `deploy.sh`, but in my-extender's root directory.
## Example extensions
At Ankyra we use extensions heavily in our delivery pipeline and we've open sourced a few of them. These extensions might not do exactly what you want, but hopefully give a flavour of what can be done:
* [extension-golang-binary](https://github.com/ankyra/extension-golang-binary): Builds Go binaries in a Docker image. * [extension-docker](https://github.com/ankyra/extension-docker): Does Docker image builds and pushes. * [extension-kubespec](https://github.com/ankyra/extension-kubespec): Does Kubernetes deployments.
## Shortcomings
Extensions are a great way to capture build and deployment patterns, but there are some things to note:
- Because you can override fields in a parent release, you can also _accidentally_ override extension fields in a parent release, and Escape won't warn you. This can make debugging harder.
- It can be tricky to release the extension itself, because as soon as you define a testing step that step will get inherited by packages that extend it; which is usually not what you want.
## Escape Plan
Extensions are configured in the [`extends`](/docs/reference/escape-plan/#extends) field of the Escape Plan.
func NewExtensionConfig ¶
func NewExtensionConfig(releaseId string) *ExtensionConfig
type ProviderConfig ¶
type ProviderConfig struct {
Name string `json:"name"`
}
func NewProviderConfig ¶
func NewProviderConfig(name string) *ProviderConfig
type ReleaseMetadata ¶
type ReleaseMetadata struct { ApiVersion int `json:"api_version"` BuiltWithCoreVersion string `json:"built_with_core_version"` BuiltWithEscapeVersion string `json:"built_with_escape_version"` Description string `json:"description"` Files map[string]string `json:"files", {}` License string `json:"license"` Logo string `json:"logo"` Name string `json:"name"` Repository string `json:"repository"` Branch string `json:"branch"` Revision string `json:"git_revision"` RevisionMessage string `json:"revision_message"` RevisionAuthor string `json:"revision_author"` Metadata map[string]string `json:"metadata"` Version string `json:"version"` Generates []string `json:"generates"` Consumes []*ConsumerConfig `json:"consumes"` Downloads []*DownloadConfig `json:"downloads"` Depends []*DependencyConfig `json:"depends"` Errands map[string]*Errand `json:"errands"` Extends []*ExtensionConfig `json:"extends"` Inputs []*variables.Variable `json:"inputs"` Outputs []*variables.Variable `json:"outputs"` Project string `json:"project"` Provides []*ProviderConfig `json:"provides"` Stages map[string]*ExecStage `json:"stages"` Templates []*templates.Template `json:"templates"` // The VariableCtx is deprecrated and used to support packages that were // compiled using an Escape version below v0.23.0. Pay no heed. This field // was superseded by tracking VariableNames on the DependencyConfig and // ConsumerConfig instead. VariableCtx map[string]string `json:"variable_context"` }
func NewEmptyReleaseMetadata ¶
func NewEmptyReleaseMetadata() *ReleaseMetadata
func NewReleaseMetadata ¶
func NewReleaseMetadata(name, version string) *ReleaseMetadata
func NewReleaseMetadataFromFile ¶
func NewReleaseMetadataFromFile(metadataFile string) (*ReleaseMetadata, error)
func NewReleaseMetadataFromJsonString ¶
func NewReleaseMetadataFromJsonString(content string) (*ReleaseMetadata, error)
func (*ReleaseMetadata) AddConsumes ¶
func (m *ReleaseMetadata) AddConsumes(c *ConsumerConfig)
func (*ReleaseMetadata) AddDependency ¶
func (m *ReleaseMetadata) AddDependency(dep *DependencyConfig)
func (*ReleaseMetadata) AddDependencyFromString ¶
func (m *ReleaseMetadata) AddDependencyFromString(dep string)
func (*ReleaseMetadata) AddExtension ¶
func (m *ReleaseMetadata) AddExtension(releaseId string)
func (*ReleaseMetadata) AddFileWithDigest ¶
func (m *ReleaseMetadata) AddFileWithDigest(path, hexDigest string)
func (*ReleaseMetadata) AddGlobPatternToGenerates ¶
func (m *ReleaseMetadata) AddGlobPatternToGenerates(globPattern string)
func (*ReleaseMetadata) AddInputVariable ¶
func (m *ReleaseMetadata) AddInputVariable(input *variables.Variable)
func (*ReleaseMetadata) AddOutputVariable ¶
func (m *ReleaseMetadata) AddOutputVariable(output *variables.Variable)
func (*ReleaseMetadata) AddProvides ¶
func (m *ReleaseMetadata) AddProvides(p string)
func (*ReleaseMetadata) GetConsumerConfig ¶
func (m *ReleaseMetadata) GetConsumerConfig(stage string) []*ConsumerConfig
func (*ReleaseMetadata) GetConsumes ¶
func (m *ReleaseMetadata) GetConsumes(stage string) []string
func (*ReleaseMetadata) GetDirectories ¶
func (m *ReleaseMetadata) GetDirectories() []string
func (*ReleaseMetadata) GetDownloads ¶
func (m *ReleaseMetadata) GetDownloads(stage string) []*DownloadConfig
func (*ReleaseMetadata) GetErrands ¶
func (m *ReleaseMetadata) GetErrands() map[string]*Errand
func (*ReleaseMetadata) GetExecStage ¶
func (m *ReleaseMetadata) GetExecStage(stage string) *ExecStage
func (*ReleaseMetadata) GetExtensions ¶
func (m *ReleaseMetadata) GetExtensions() []string
func (*ReleaseMetadata) GetInputs ¶
func (m *ReleaseMetadata) GetInputs(stage string) []*variables.Variable
func (*ReleaseMetadata) GetInputsInScopes ¶
func (m *ReleaseMetadata) GetInputsInScopes(stages []string) []*variables.Variable
func (*ReleaseMetadata) GetOutputs ¶
func (m *ReleaseMetadata) GetOutputs(stage string) []*variables.Variable
func (*ReleaseMetadata) GetProject ¶
func (m *ReleaseMetadata) GetProject() string
func (*ReleaseMetadata) GetProvides ¶
func (m *ReleaseMetadata) GetProvides() []string
func (*ReleaseMetadata) GetQualifiedReleaseId ¶
func (m *ReleaseMetadata) GetQualifiedReleaseId() string
func (*ReleaseMetadata) GetReleaseId ¶
func (m *ReleaseMetadata) GetReleaseId() string
func (*ReleaseMetadata) GetStage ¶
func (m *ReleaseMetadata) GetStage(stage string) *ExecStage
func (*ReleaseMetadata) GetTemplates ¶
func (m *ReleaseMetadata) GetTemplates(stage string) []*templates.Template
func (*ReleaseMetadata) GetVersionlessReleaseId ¶
func (m *ReleaseMetadata) GetVersionlessReleaseId() string
func (*ReleaseMetadata) SetConsumes ¶
func (m *ReleaseMetadata) SetConsumes(c []string)
func (*ReleaseMetadata) SetDependencies ¶
func (m *ReleaseMetadata) SetDependencies(deps []string)
func (*ReleaseMetadata) SetExecStage ¶
func (m *ReleaseMetadata) SetExecStage(stage string, exec *ExecStage)
func (*ReleaseMetadata) SetProvides ¶
func (m *ReleaseMetadata) SetProvides(p []string)
func (*ReleaseMetadata) ToDependency ¶
func (m *ReleaseMetadata) ToDependency() *Dependency
func (*ReleaseMetadata) ToDict ¶
func (m *ReleaseMetadata) ToDict() (map[string]interface{}, error)
func (*ReleaseMetadata) ToJson ¶
func (m *ReleaseMetadata) ToJson() string
func (*ReleaseMetadata) ToScript ¶
func (m *ReleaseMetadata) ToScript() script.Script
func (*ReleaseMetadata) ToScriptMap ¶
func (m *ReleaseMetadata) ToScriptMap() map[string]script.Script
func (*ReleaseMetadata) Validate ¶
func (m *ReleaseMetadata) Validate() error
func (*ReleaseMetadata) WriteJsonFile ¶
func (m *ReleaseMetadata) WriteJsonFile(path string) error
type ResolvedDependencyConfig ¶
type ResolvedDependencyConfig struct { *DependencyConfig ReleaseMetadata *ReleaseMetadata }
type SemanticVersion ¶
type SemanticVersion struct {
// contains filtered or unexported fields
}
func NewSemanticVersion ¶
func NewSemanticVersion(v string) *SemanticVersion
func (*SemanticVersion) Equals ¶
func (s *SemanticVersion) Equals(o *SemanticVersion) bool
func (*SemanticVersion) IncrementSmallest ¶
func (s *SemanticVersion) IncrementSmallest() error
func (*SemanticVersion) LessOrEqual ¶
func (s *SemanticVersion) LessOrEqual(o *SemanticVersion) bool
func (*SemanticVersion) OnlyKeepLeadingVersionPart ¶
func (s *SemanticVersion) OnlyKeepLeadingVersionPart()
func (*SemanticVersion) ToString ¶
func (s *SemanticVersion) ToString() string