From b8b72b254f0a93b3896d8c9f41ab65760f0e3bbd Mon Sep 17 00:00:00 2001 From: CrabHo Date: Thu, 19 Nov 2020 15:42:18 +0800 Subject: [PATCH] feat: mask secrets --- .../pipeline/pipeline/frontend/yaml/compiler/compiler.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cncd/pipeline/pipeline/frontend/yaml/compiler/compiler.go b/cncd/pipeline/pipeline/frontend/yaml/compiler/compiler.go index 7fe38486f..bcf6dcb81 100644 --- a/cncd/pipeline/pipeline/frontend/yaml/compiler/compiler.go +++ b/cncd/pipeline/pipeline/frontend/yaml/compiler/compiler.go @@ -87,6 +87,15 @@ func (c *Compiler) Compile(conf *yaml.Config) *backend.Config { }) } + // create secrets for mask + for _, sec := range c.secrets { + config.Secrets = append(config.Secrets, &backend.Secret{ + Name: sec.Name, + Value: sec.Value, + Mask: true, + }) + } + // overrides the default workspace paths when specified // in the YAML file. if len(conf.Workspace.Base) != 0 {