k8s.io/kubernetes@v1.29.3/test/images/windows/Makefile (about) 1 # Copyright 2020 The Kubernetes Authors. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 REGISTRY ?= registry.k8s.io/e2e-test-images 16 REMOTE_DOCKER_URL ?= 17 DOCKER_CERT_PATH ?= "$(HOME)/.docker" 18 export 19 20 ALL_IMAGES = powershell-helper 21 22 sub-build-%: 23 img_version=$(shell cat $*/VERSION); \ 24 docker --tlsverify --tlscacert "$(DOCKER_CERT_PATH)/ca.pem" \ 25 --tlscert "$(DOCKER_CERT_PATH)/cert.pem" --tlskey "$(DOCKER_CERT_PATH)/key.pem" \ 26 -H "$(REMOTE_DOCKER_URL)" build --no-cache --pull -t "$(REGISTRY)/$*:$${img_version}" \ 27 -f $*/Dockerfile_windows $*/ 28 29 sub-push-%: 30 img_version=`cat $*/VERSION`; \ 31 docker --tlsverify --tlscacert "$(DOCKER_CERT_PATH)/ca.pem" \ 32 --tlscert "$(DOCKER_CERT_PATH)/cert.pem" --tlskey "$(DOCKER_CERT_PATH)/key.pem" \ 33 -H "$(REMOTE_DOCKER_URL)" push "$(REGISTRY)/$*:$${img_version}" 34 35 sub-repush-as-linux-%: 36 img_version=$(shell cat $*/VERSION); \ 37 docker buildx build --provenance=false --sbom=false --progress=plain --no-cache --pull --output=type=registry --platform "linux/amd64" \ 38 --build-arg SOURCE="$(REGISTRY)/$*:$${img_version}" -t "$(REGISTRY)/$*:$${img_version}"-linux-cache $*/ 39 40 all-build: $(foreach image, ${ALL_IMAGES}, sub-build-${image}) 41 42 all-push: all-build $(foreach image, ${ALL_IMAGES}, sub-push-${image}) 43 44 all-push-as-linux: all-push $(foreach image, ${ALL_IMAGES}, sub-repush-as-linux-${image}) 45 46 .PHONY: all-build all-push all-push-as-linux