Skip to content

Commit

Permalink
another solution to reduce the diff
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasgiese committed Nov 4, 2021
1 parent 0c8d3df commit c4ebf02
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ test-e2e: $(GINKGO) $(KIND) $(KUSTOMIZE) e2e-image test-e2e-image-prerequisites

.PHONY: e2e-image
e2e-image: CONTROLLER_IMG_TAG = "gcr.io/k8s-staging-capi-openstack/capi-openstack-controller:e2e"
e2e-image: docker-pull-prerequisites ## Build the docker image for controller-manager
docker build -f $(CONTAINERFILE) --build-arg goproxy=$(GOPROXY) --build-arg ARCH=$(ARCH) --build-arg LDFLAGS="$(LDFLAGS)" . -t $(CONTROLLER_IMG_TAG)
e2e-image: docker-build

# Pull all the images references in test/e2e/data/e2e_conf.yaml
test-e2e-image-prerequisites:
Expand Down Expand Up @@ -228,11 +227,11 @@ generate-manifests: $(CONTROLLER_GEN) ## Generate manifests e.g. CRD, RBAC etc.

.PHONY: docker-build
docker-build: docker-pull-prerequisites ## Build the docker image for controller-manager
docker build -f $(CONTAINERFILE) --build-arg goproxy=$(GOPROXY) --build-arg ARCH=$(ARCH) --build-arg LDFLAGS="$(LDFLAGS)" . -t $(CONTROLLER_IMG)-$(ARCH):$(TAG)
docker build -f $(CONTAINERFILE) --build-arg goproxy=$(GOPROXY) --build-arg ARCH=$(ARCH) --build-arg LDFLAGS="$(LDFLAGS)" . -t $(CONTROLLER_IMG_TAG)

.PHONY: docker-push
docker-push: ## Push the docker image
docker push $(CONTROLLER_IMG)-$(ARCH):$(TAG)
docker push $(CONTROLLER_IMG_TAG)

.PHONY: docker-pull-prerequisites
docker-pull-prerequisites:
Expand All @@ -248,14 +247,14 @@ docker-pull-prerequisites:
docker-build-all: $(addprefix docker-build-,$(ALL_ARCH))

docker-build-%:
$(MAKE) ARCH=$* docker-build
$(MAKE) CONTROLLER_IMG_TAG=$(CONTROLLER_IMG)-$*:$(TAG) docker-build

.PHONY: docker-push-all ## Push all the architecture docker images
docker-push-all: $(addprefix docker-push-,$(ALL_ARCH))
$(MAKE) docker-push-manifest

docker-push-%:
$(MAKE) ARCH=$* docker-push
$(MAKE) CONTROLLER_IMG_TAG=$(CONTROLLER_IMG)-$*:$(TAG) docker-push

.PHONY: docker-push-manifest
docker-push-manifest: ## Push the fat manifest docker image.
Expand Down

0 comments on commit c4ebf02

Please sign in to comment.