Skip to content

Commit

Permalink
feat: support mixins, static grpc test client
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Allard committed Apr 29, 2022
1 parent cdb1a71 commit 54edd8c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ arguments:
vaultSecrets:
type: list
description: List of secrets to consume from Vault, if Vault is enabled in the box config
mixins:
type: list
description: "Deprecated: List of mixins to also import. Set in override.jsonnet instead"
###EndBlock(keys)
2 changes: 1 addition & 1 deletion templates/api/rpc/test_client.go.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- if not (has "grpc" (stencil.Arg "type")) }}
{{- file.Skip "Not a gRPC service" }}
{{- end }}
{{- $_ := file.Static }}
{{- $_ := file.SetPath (printf "api/%s/%s" .Config.Name (base file.Path)) }}
// {{ stencil.ApplyTemplate "copyright" }}

Expand All @@ -17,7 +18,6 @@ import (

"github.com/getoutreach/mint/pkg/authn"
"github.com/getoutreach/services/pkg/grpcx"

"{{ stencil.ApplyTemplate "appImportPath" }}/api"
)

Expand Down
7 changes: 5 additions & 2 deletions templates/deployments/appname/app.jsonnet.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,11 @@ local developmentSecrets = {
local override = import './{{ $appName }}.override.jsonnet';
local configuration = import './{{ $appName }}.config.jsonnet';

// TODO(jaredallard): Need to load mixins
local mixins = [];
local mixins = [
{{- range $mixin := concat (stencil.Arg "mixins") (stencil.GetModuleHook "mixins") }}
'./mixins/{{ $mixin }}.jsonnet',
{{- end }}
];
local mergedMixins = std.foldl(function(x, y) (x + y), mixins, {});

ok.FilteredList() {
Expand Down

0 comments on commit 54edd8c

Please sign in to comment.