Skip to content

Commit

Permalink
[POR-2028] persist the pre-deploy tasks when custom helm values are s…
Browse files Browse the repository at this point in the history
…pecified (#3867)
  • Loading branch information
jose-fully-ported authored Nov 6, 2023
1 parent 8307267 commit 97cb1c5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions api/server/handlers/porter_app/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,23 @@ func parse(ctx context.Context, conf ParseConf) (*chart.Chart, map[string]interf
defer span.End()

parsed := &PorterStackYAML{}
if err := yaml.Unmarshal(conf.PorterYaml, parsed); err != nil {
err = telemetry.Error(ctx, span, err, "error parsing porter.yaml")
return nil, nil, nil, err
}

if conf.FullHelmValues != "" {
parsedHelmValues, err := convertHelmValuesToPorterYaml(conf.FullHelmValues)
if err != nil {
err = telemetry.Error(ctx, span, err, "error parsing raw helm values")
return nil, nil, nil, err
}
parsed = parsedHelmValues
} else {
err := yaml.Unmarshal(conf.PorterYaml, parsed)
if err != nil {
err = telemetry.Error(ctx, span, err, "error parsing porter.yaml")
return nil, nil, nil, err

if parsed.Release != nil && parsed.Release.Run != nil {
parsedHelmValues.Release = parsed.Release
}

parsed = parsedHelmValues
}

synced_env := make([]*SyncedEnvSection, 0)
Expand Down

0 comments on commit 97cb1c5

Please sign in to comment.