(ctx context.Context, dockerCLI command.Cli, req pushRequest)
| 246 | } |
| 247 | |
| 248 | func pushList(ctx context.Context, dockerCLI command.Cli, req pushRequest) error { |
| 249 | registryClient := newRegistryClient(dockerCLI, req.insecure) |
| 250 | |
| 251 | if err := mountBlobs(ctx, registryClient, req.targetRef, req.manifestBlobs); err != nil { |
| 252 | return err |
| 253 | } |
| 254 | if err := pushReferences(ctx, dockerCLI.Out(), registryClient, req.mountRequests); err != nil { |
| 255 | return err |
| 256 | } |
| 257 | dgst, err := registryClient.PutManifest(ctx, req.targetRef, req.list) |
| 258 | if err != nil { |
| 259 | return err |
| 260 | } |
| 261 | |
| 262 | _, _ = fmt.Fprintln(dockerCLI.Out(), dgst.String()) |
| 263 | return nil |
| 264 | } |
| 265 | |
| 266 | func pushReferences(ctx context.Context, out io.Writer, client registryclient.RegistryClient, mounts []mountRequest) error { |
| 267 | for _, mount := range mounts { |
no test coverage detected
searching dependent graphs…