Skip to content

Commit

Permalink
include env groups defined in porter.yaml (#3618)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianedwards authored Sep 21, 2023
1 parent 41ab8cd commit 36ee84e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/porter_app/v2/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ func AppProtoFromYaml(ctx context.Context, porterYamlBytes []byte, appName strin
appProto.Predeploy = predeployProto
}

envGroups := make([]*porterv1.EnvGroup, 0)
if porterYaml.EnvGroups != nil {
for _, envGroupName := range porterYaml.EnvGroups {
envGroups = append(envGroups, &porterv1.EnvGroup{
Name: envGroupName,
})
}
}
appProto.EnvGroups = envGroups

return appProto, porterYaml.Env, nil
}

Expand All @@ -100,7 +110,7 @@ type PorterYAML struct {
Env map[string]string `yaml:"env"`

Predeploy *Service `yaml:"predeploy"`
EnvGroups []string `yaml:"env_groups,omitempty"`
EnvGroups []string `yaml:"envGroups,omitempty"`
}

// Build represents the build settings for a Porter app
Expand Down

0 comments on commit 36ee84e

Please sign in to comment.