[INFRA-418] | Anoop | Support $.environment alongwith $.extraResources.environment
This commit is contained in:
3
main.go
3
main.go
@@ -48,6 +48,9 @@ func parseManifest(manifestPath string) (*Manifest, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if manifest.ExtraResources.Environment == "" {
|
||||
manifest.ExtraResources.Environment = manifest.Environment
|
||||
}
|
||||
|
||||
manifest.ExtraResources.Workspace = workspaceMap[manifest.ExtraResources.Environment]
|
||||
if manifest.Deployment == nil {
|
||||
|
||||
2
types.go
2
types.go
@@ -8,6 +8,7 @@ type Deployment struct {
|
||||
}
|
||||
|
||||
type Manifest struct {
|
||||
Environment string `json:"environment"`
|
||||
ExtraResources *ExtraResources `json:"extraResources" valid:"required"`
|
||||
Team *Team `json:"team"`
|
||||
Deployment *Deployment `json:"deployment"`
|
||||
@@ -15,6 +16,7 @@ type Manifest struct {
|
||||
}
|
||||
|
||||
type ExtraResources struct {
|
||||
//TODO: Remove environment from ExtraResources once all apps have migrated to new schema
|
||||
Environment string `json:"environment"`
|
||||
Workspace string
|
||||
Database *Database `json:"database"`
|
||||
|
||||
Reference in New Issue
Block a user