[INFRA-418] | Anoop | Support $.environment alongwith $.extraResources.environment

This commit is contained in:
anoop narang
2020-07-05 13:24:25 +05:30
parent 57527de770
commit 83d42afce7
2 changed files with 5 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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"`