From 39681951681db3998fa02635c88bcca3b4d3bb17 Mon Sep 17 00:00:00 2001 From: Don Date: Mon, 24 Oct 2016 10:55:54 -0700 Subject: [PATCH] Implement skip verify for secrets --- agent/agent.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 74e364c17..02aac61df 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -94,13 +94,17 @@ func (a *Agent) prep(w *model.Work) (*yaml.Config, error) { envs := toEnv(w) w.Yaml = expander.ExpandString(w.Yaml, envs) - // inject the netrc file into the clone plugin if the repository is - // private and requires authentication. + // append secrets when verified or when a secret does not require + // verification var secrets []*model.Secret - if w.Verified { - secrets = append(secrets, w.Secrets...) + for _, secret := range w.Secrets { + if w.Verified || secret.SkipVerify { + secrets = append(secrets, secret) + } } + // inject the netrc file into the clone plugin if the repository is + // private and requires authentication. if w.Repo.IsPrivate { secrets = append(secrets, &model.Secret{ Name: "DRONE_NETRC_USERNAME",