diff --git a/functions/kv-pump/main.go b/functions/kv-pump/main.go index 961ab76..ad239a3 100644 --- a/functions/kv-pump/main.go +++ b/functions/kv-pump/main.go @@ -106,10 +106,6 @@ func Invoke(ctx context.Context, e gcp.GCSEvent) error { log.Printf("%s: no files to publish\n", pkgName) } - if err := audit.WroteKV(ctx, pkgName, version, sris, kvKeys, string(configStr)); err != nil { - log.Printf("failed to audit: %s\n", err) - } - newFiles := cleanNewKVFiles(kvfiles) pkg := new(packages.Package) @@ -133,6 +129,10 @@ func Invoke(ctx context.Context, e gcp.GCSEvent) error { return fmt.Errorf("failed to update SRIs: %s", err) } + if err := audit.WroteKV(ctx, pkgName, version, sris, kvKeys, string(configStr)); err != nil { + log.Printf("failed to audit: %s\n", err) + } + return nil }