mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Allow DOCKER_FORCE_PUSH for test images.
The push-* command skips rebuild and image push w/ `latest` tag when a image tag exists remotely. Most of gVisor test images have never got a chance to be tagged because they already exist when `DOCKER_PUSH_AS_LATEST` was introduced. We shouldn't enable DOCKER_FORCE_PUSH in our pipelines, it is better to be a one off tool when the `latest` tag of an image is missing from remote repos. PiperOrigin-RevId: 696823576
This commit is contained in:
+4
-1
@@ -183,9 +183,12 @@ test-%: register-cross ## Build an image locally if the remote doesn't exist.
|
||||
# tag.
|
||||
# If DOCKER_PUSH_AS_LATEST is set to true, this also marks this image as being
|
||||
# the latest one on the remote repository.
|
||||
# When DOCKER_FORCE_PUSH is true, it always pushes the image regardless of
|
||||
# whether the image already exists on the remote.
|
||||
DOCKER_PUSH_AS_LATEST ?= false
|
||||
DOCKER_FORCE_PUSH ?= false
|
||||
push-%:
|
||||
$(call image_manifest,$*) >&2 || \
|
||||
($(call image_manifest,$*) >&2 && test $(DOCKER_FORCE_PUSH) '!=' true) || \
|
||||
( $(call rebuild,$*) && \
|
||||
docker image push $(call remote_image,$*):$(call tag,$*) >&2 && \
|
||||
( test $(DOCKER_PUSH_AS_LATEST) '!=' true || \
|
||||
|
||||
Reference in New Issue
Block a user