From 49bc3d847433ae12d18005751f4a9f39bfe156e4 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 21 Mar 2019 16:56:00 -0400 Subject: [PATCH] Remove all secrets in context.go if disabled --- worker/context.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worker/context.go b/worker/context.go index 191100a..c2812ec 100644 --- a/worker/context.go +++ b/worker/context.go @@ -96,6 +96,10 @@ func (wctx *WorkerContext) RunBuild( panic(errors.Wrap(err, "job.SetStatus")) } + if !job.Secrets { + manifest.Secrets = []string{} + } + defer func() { if err := recover(); err != nil { log.Printf("run_build panic: %v", err) -- 2.38.5