(ctx context.Context, urls []string, freshen bool)
| 140 | } |
| 141 | |
| 142 | func (t *Tracker) trackImageReferences(ctx context.Context, urls []string, freshen bool) error { |
| 143 | refs, err := image.ParseAndResolveAll(ctx, urls, name.StrictValidation) |
| 144 | if err != nil { |
| 145 | return err |
| 146 | } |
| 147 | |
| 148 | if freshen { |
| 149 | log.Debug("Freshen is enabled") |
| 150 | imageRefs, err := inputBundleTags(ctx, *t) |
| 151 | if err != nil { |
| 152 | return err |
| 153 | } |
| 154 | |
| 155 | refs = append(refs, imageRefs...) |
| 156 | } |
| 157 | |
| 158 | for _, ref := range refs { |
| 159 | log.Debugf("Processing bundle %q", ref.String()) |
| 160 | hasTask, err := containsTask(ctx, ref) |
| 161 | if err != nil { |
| 162 | return err |
| 163 | } |
| 164 | |
| 165 | if hasTask { |
| 166 | t.addTrustedTaskRecord(ociPrefix, taskRecord{ |
| 167 | Ref: ref.Digest, |
| 168 | Tag: ref.Tag, |
| 169 | Repository: ref.Repository, |
| 170 | }) |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | return nil |
| 175 | } |
| 176 | |
| 177 | func (t *Tracker) trackGitReferences(ctx context.Context, urls []string, freshen bool) error { |
| 178 | if freshen { |
no test coverage detected