Don't pull an image to validate that it exists

PiperOrigin-RevId: 613612492
This commit is contained in:
Andrei Vagin
2024-03-07 09:41:08 -08:00
committed by gVisor bot
parent 02000395de
commit 460a1789d0
+6 -5
View File
@@ -163,11 +163,12 @@ rebuild-%: register-cross ## Force rebuild an image locally.
load-%: register-cross ## Pull or build an image locally.
@($(call pull,$*)) || ($(call rebuild,$*))
# push pushes the remote image, after either pulling (to validate that the tag
# already exists) or building manually. Note that this generic rule will match
# the fully-expanded remote image tag.
push-%: load-% ## Push a given image.
@docker image push -q $(call remote_image,$*):$(call tag,$*) >&2
# push pushes the remote image, after validating that the tag doesn't exist
# yet. Note that this generic rule will match the fully-expanded remote image
# tag.
push-%:
gcloud artifacts docker images describe $(call remote_image,$*):$(call tag,$*) >&2 || \
docker image push $(call remote_image,$*):$(call tag,$*) >&2
# register-cross registers the necessary qemu binaries for cross-compilation.
# This may be used by any target that may execute containers that are not the