nolint:unused // will be used when linuxkit cache is eliminated and we return to docker image cache
(img, suffix string, pushImage, pushManifest bool)
| 480 | |
| 481 | //nolint:unused // will be used when linuxkit cache is eliminated and we return to docker image cache |
| 482 | func (dr *dockerRunnerImpl) pushWithManifest(img, suffix string, pushImage, pushManifest bool) error { |
| 483 | var err error |
| 484 | if pushImage { |
| 485 | fmt.Printf("Pushing %s\n", img+suffix) |
| 486 | if err := dr.push(img + suffix); err != nil { |
| 487 | return err |
| 488 | } |
| 489 | } else { |
| 490 | fmt.Print("Image push disabled, skipping...\n") |
| 491 | } |
| 492 | |
| 493 | if pushManifest { |
| 494 | fmt.Printf("Pushing %s to manifest %s\n", img+suffix, img) |
| 495 | _, _, err = registry.PushManifest(img, remote.WithAuthFromKeychain(authn.DefaultKeychain)) |
| 496 | if err != nil { |
| 497 | return err |
| 498 | } |
| 499 | } else { |
| 500 | fmt.Print("Manifest push disabled, skipping...\n") |
| 501 | } |
| 502 | return nil |
| 503 | } |
| 504 | |
| 505 | func (dr *dockerRunnerImpl) Tag(ref, tag string) error { |
| 506 | fmt.Printf("Tagging %s as %s\n", ref, tag) |