Skip to content

Commit b893c11

Browse files
🐛 (go/v4) fix makefile target to build images ensuring its single responsability
1 parent 68abac1 commit b893c11

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed

docs/book/src/component-config-tutorial/testdata/project/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
7878
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
7979
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8080
.PHONY: docker-build
81-
docker-build: test ## Build docker image with the manager.
81+
docker-build: ## Build docker image with the manager.
8282
$(CONTAINER_TOOL) build -t ${IMG} .
8383

8484
.PHONY: docker-push
@@ -93,7 +93,7 @@ docker-push: ## Push docker image with the manager.
9393
# To properly provided solutions that supports more than one platform you should use this option.
9494
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
9595
.PHONY: docker-buildx
96-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
9797
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
9898
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
9999
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

docs/book/src/cronjob-tutorial/testdata/project/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
7878
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
7979
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8080
.PHONY: docker-build
81-
docker-build: test ## Build docker image with the manager.
81+
docker-build: ## Build docker image with the manager.
8282
$(CONTAINER_TOOL) build -t ${IMG} .
8383

8484
.PHONY: docker-push
@@ -93,7 +93,7 @@ docker-push: ## Push docker image with the manager.
9393
# To properly provided solutions that supports more than one platform you should use this option.
9494
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
9595
.PHONY: docker-buildx
96-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
9797
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
9898
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
9999
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
142142
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
143143
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
144144
.PHONY: docker-build
145-
docker-build: test ## Build docker image with the manager.
145+
docker-build: ## Build docker image with the manager.
146146
$(CONTAINER_TOOL) build -t ${IMG} .
147147
148148
.PHONY: docker-push
@@ -157,7 +157,7 @@ docker-push: ## Push docker image with the manager.
157157
# To properly provided solutions that supports more than one platform you should use this option.
158158
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
159159
.PHONY: docker-buildx
160-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
160+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
161161
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
162162
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
163163
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

testdata/project-v4-declarative-v1/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
7878
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
7979
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8080
.PHONY: docker-build
81-
docker-build: test ## Build docker image with the manager.
81+
docker-build: ## Build docker image with the manager.
8282
$(CONTAINER_TOOL) build -t ${IMG} .
8383

8484
.PHONY: docker-push
@@ -93,7 +93,7 @@ docker-push: ## Push docker image with the manager.
9393
# To properly provided solutions that supports more than one platform you should use this option.
9494
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
9595
.PHONY: docker-buildx
96-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
9797
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
9898
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
9999
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

testdata/project-v4-multigroup/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
7878
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
7979
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8080
.PHONY: docker-build
81-
docker-build: test ## Build docker image with the manager.
81+
docker-build: ## Build docker image with the manager.
8282
$(CONTAINER_TOOL) build -t ${IMG} .
8383

8484
.PHONY: docker-push
@@ -93,7 +93,7 @@ docker-push: ## Push docker image with the manager.
9393
# To properly provided solutions that supports more than one platform you should use this option.
9494
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
9595
.PHONY: docker-buildx
96-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
9797
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
9898
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
9999
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

testdata/project-v4-with-deploy-image/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
7878
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
7979
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8080
.PHONY: docker-build
81-
docker-build: test ## Build docker image with the manager.
81+
docker-build: ## Build docker image with the manager.
8282
$(CONTAINER_TOOL) build -t ${IMG} .
8383

8484
.PHONY: docker-push
@@ -93,7 +93,7 @@ docker-push: ## Push docker image with the manager.
9393
# To properly provided solutions that supports more than one platform you should use this option.
9494
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
9595
.PHONY: docker-buildx
96-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
9797
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
9898
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
9999
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

testdata/project-v4-with-grafana/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
7878
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
7979
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8080
.PHONY: docker-build
81-
docker-build: test ## Build docker image with the manager.
81+
docker-build: ## Build docker image with the manager.
8282
$(CONTAINER_TOOL) build -t ${IMG} .
8383

8484
.PHONY: docker-push
@@ -93,7 +93,7 @@ docker-push: ## Push docker image with the manager.
9393
# To properly provided solutions that supports more than one platform you should use this option.
9494
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
9595
.PHONY: docker-buildx
96-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
9797
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
9898
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
9999
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

testdata/project-v4/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
7878
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
7979
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8080
.PHONY: docker-build
81-
docker-build: test ## Build docker image with the manager.
81+
docker-build: ## Build docker image with the manager.
8282
$(CONTAINER_TOOL) build -t ${IMG} .
8383

8484
.PHONY: docker-push
@@ -93,7 +93,7 @@ docker-push: ## Push docker image with the manager.
9393
# To properly provided solutions that supports more than one platform you should use this option.
9494
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
9595
.PHONY: docker-buildx
96-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
9797
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
9898
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
9999
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

0 commit comments

Comments
 (0)