INFRA-558 | Deepak Jain| adding workspace
This commit is contained in:
11
main.go
11
main.go
@@ -2,13 +2,14 @@ package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/a8m/envsubst"
|
||||
"github.com/asaskevich/govalidator"
|
||||
"github.com/caarlos0/env/v6"
|
||||
"github.com/urfave/cli/v2"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -51,8 +52,10 @@ func parseManifest(manifestPath string) (*Manifest, error) {
|
||||
if manifest.ExtraResources.Environment == "" {
|
||||
manifest.ExtraResources.Environment = manifest.Environment
|
||||
}
|
||||
if manifest.ExtraResources.Workspace == "" {
|
||||
manifest.ExtraResources.Workspace = workspaceMap[manifest.ExtraResources.Environment]
|
||||
}
|
||||
|
||||
manifest.ExtraResources.Workspace = workspaceMap[manifest.ExtraResources.Environment]
|
||||
if manifest.Deployment == nil {
|
||||
manifest.Deployment = &Deployment{}
|
||||
}
|
||||
|
||||
4
types.go
4
types.go
@@ -17,8 +17,8 @@ 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
|
||||
Environment string `json:"environment"`
|
||||
Workspace string `json:"workspace"`
|
||||
Database *Database `json:"database"`
|
||||
ServiceRole *ServiceRole `json:"aws_access"`
|
||||
S3Buckets []S3Bucket `json:"s3_buckets"`
|
||||
|
||||
Reference in New Issue
Block a user