2022-11-18 09:57:31 +00:00
|
|
|
package config
|
|
|
|
|
2023-06-18 14:47:01 +00:00
|
|
|
type Mode string
|
|
|
|
|
2022-11-18 09:57:31 +00:00
|
|
|
// Environment defines overrides for a single environment.
|
|
|
|
// This structure is recursively merged into the root configuration.
|
|
|
|
type Environment struct {
|
2022-12-15 20:28:14 +00:00
|
|
|
// Default marks that this environment must be used if one isn't specified
|
|
|
|
// by the user (through environment variable or command line argument).
|
|
|
|
Default bool `json:"default,omitempty"`
|
|
|
|
|
2023-06-18 14:47:01 +00:00
|
|
|
Mode Mode `json:"mode,omitempty"`
|
|
|
|
|
2022-11-18 09:57:31 +00:00
|
|
|
Bundle *Bundle `json:"bundle,omitempty"`
|
|
|
|
|
|
|
|
Workspace *Workspace `json:"workspace,omitempty"`
|
|
|
|
|
2022-11-30 13:15:22 +00:00
|
|
|
Artifacts map[string]*Artifact `json:"artifacts,omitempty"`
|
|
|
|
|
2022-11-18 09:57:31 +00:00
|
|
|
Resources *Resources `json:"resources,omitempty"`
|
2023-05-15 12:07:18 +00:00
|
|
|
|
|
|
|
// Override default values for defined variables
|
|
|
|
// Does not permit defining new variables or redefining existing ones
|
|
|
|
// in the scope of an environment
|
|
|
|
Variables map[string]string `json:"variables,omitempty"`
|
2022-11-18 09:57:31 +00:00
|
|
|
}
|
2023-07-03 14:30:42 +00:00
|
|
|
|
|
|
|
const (
|
|
|
|
// Right now, we just have a default / "" mode and a "development" mode.
|
|
|
|
// Additional modes are expected to come for pull-requests and production.
|
|
|
|
Development Mode = "development"
|
|
|
|
)
|