diff --git a/plugins/secrets/vault/vault.go b/plugins/secrets/vault/vault.go index e1b55863..dc687116 100644 --- a/plugins/secrets/vault/vault.go +++ b/plugins/secrets/vault/vault.go @@ -92,17 +92,24 @@ func (v *vault) list(repo *model.Repo, build *model.Build) ([]*model.Secret, err continue } + logrus.Debugf("vault: read secret: %s", path) + vaultSecret, err := v.get(path) if err != nil { + logrus.Debugf("vault: read secret failed: %s: %s", path, err) return nil, err } if vaultSecret == nil { + logrus.Debugf("vault: read secret failed: %s: not found or empty value", path) continue } if !vaultSecret.Match(repo.FullName) { + logrus.Debugf("vault: read secret: %s: restricted: %s", path, repo.FullName) continue } + logrus.Debugf("vault: read secret success: %s", err) + secrets = append(secrets, &model.Secret{ Name: key, Value: vaultSecret.Value, @@ -133,7 +140,7 @@ func (v *vault) start() { if v.done != nil { close(v.done) } - logrus.Debugf("vault: token renewal enabled: renew every %v", v.renew) + logrus.Infof("vault: token renewal enabled: renew every %v", v.renew) v.done = make(chan struct{}) if v.renew != 0 { go v.renewLoop()