diff --git a/Makefile b/Makefile index ebfa6f2b11..9096dea056 100644 --- a/Makefile +++ b/Makefile @@ -185,9 +185,6 @@ IMAGES := \ $(ASKPASS_IMAGE) \ $(RESOURCE_GROUP_IMAGE) -# nomos binary for local run. -NOMOS_LOCAL := $(BIN_DIR)/linux_amd64/nomos - # Allows an interactive docker build or test session to be interrupted # by Ctrl-C. This must be turned off in case of non-interactive runs, # like in CI/CD. @@ -299,6 +296,11 @@ all: buildenv-dirs @docker run $(DOCKER_RUN_ARGS) \ make all-local +# Run any make target in the docker buildenv container +# e.g. make clientgen-in-docker -> docker run ... make clientgen +%-in-docker: buildenv-dirs + @docker run $(DOCKER_RUN_ARGS) make $* + .PHONY: all-local # Run tests, cleanup dependencies, and generate CRDs locally all-local: test deps clientgen configsync-crds @@ -352,8 +354,7 @@ __test-presubmit: all-local # This is the entrypoint used by the ProwJob - runs using docker-in-docker. .PHONY: test-presubmit -test-presubmit: pull-buildenv - @docker run $(DOCKER_RUN_ARGS) make __test-presubmit +test-presubmit: pull-buildenv __test-presubmit-in-docker # Runs all tests. # This only runs on local dev environment not CI environment. diff --git a/Makefile.build b/Makefile.build index 360f9db8aa..28d3f680d4 100644 --- a/Makefile.build +++ b/Makefile.build @@ -81,10 +81,6 @@ $(BUILD_IMAGE_TARGETS): "$(HELM)" "$(KUSTOMIZE)" .PHONY: build-images build-images: $(BUILD_IMAGE_TARGETS) -# Deprecated alias of build-images. Remove this once unused. -.PHONY: build-images-multirepo -build-images-multirepo: build-images - .PHONY: auth-docker auth-docker: @echo "+++ Using account:" @@ -102,10 +98,6 @@ $(PUSH_IMAGE_TARGETS): auth-docker .PHONY: push-images push-images: $(PUSH_IMAGE_TARGETS) -# Deprecated alias of push-images. Remove this once unused. -.PHONY: push-images-multirepo -push-images-multirepo: push-images - # Targets for pulling individual images PULL_IMAGE_TARGETS := $(patsubst %,__pull-image-%,$(IMAGES)) @@ -117,10 +109,6 @@ $(PULL_IMAGE_TARGETS): auth-docker .PHONY: pull-images pull-images: $(PULL_IMAGE_TARGETS) -# Deprecated alias of pull-images. Remove this once unused. -.PHONY: pull-images-multirepo -pull-images-multirepo: pull-images - # Targets for retagging individual images RETAG_IMAGE_TARGETS := $(patsubst %,__retag-image-%,$(IMAGES)) @@ -132,10 +120,6 @@ $(RETAG_IMAGE_TARGETS): .PHONY: retag-images retag-images: $(RETAG_IMAGE_TARGETS) -# Deprecated alias of retag-images. Remove this once unused. -.PHONY: retag-images-multirepo -retag-images-multirepo: retag-images - ################################### # Config Sync manifest ################################### diff --git a/Makefile.e2e b/Makefile.e2e index 4f12bfca42..3433d016a6 100644 --- a/Makefile.e2e +++ b/Makefile.e2e @@ -5,8 +5,6 @@ E2E_PARAMS := \ GCP_PROJECT=$(GCP_PROJECT) \ REGISTRY=$(REGISTRY) \ -GOTOPT2_BINARY := docker run -i -u $(UID):$(GID) $(BUILDENV_IMAGE) /bin/gotopt2 - GCP_ZONE ?= us-central1-a GKE_E2E_TIMEOUT ?= 6h # Configurable timeout for running the e2e tests on kind clusters. diff --git a/Makefile.gen b/Makefile.gen index cce68e32de..c8ef6291e1 100644 --- a/Makefile.gen +++ b/Makefile.gen @@ -53,12 +53,6 @@ clientgen: symlink-gopath $(INSTALL_CLIENTGEN_TOOLS) @echo "+++ Generating clientgen directory" ./scripts/generate-clientset.sh -.PHONY: clientgen-in-docker -# Run make clientgen in the docker buildenv container -clientgen-in-docker: buildenv-dirs - @docker run $(DOCKER_RUN_ARGS) \ - make clientgen - # To regenerate api_resources_1_15.txt: # 1) Create a fresh 1.15 cluster that DOES NOT have ACM installed. # 2) Run the below command: diff --git a/Makefile.reconcilermanager b/Makefile.reconcilermanager index 2e938a1b2d..39e6062b21 100644 --- a/Makefile.reconcilermanager +++ b/Makefile.reconcilermanager @@ -1,23 +1,22 @@ +CONTROLLER_GEN_PATHS := \ + paths="./pkg/api/configsync/v1alpha1" \ + paths="./pkg/api/configsync/v1beta1" \ + paths="./pkg/api/configmanagement/v1" \ + paths="./pkg/api/kpt.dev/v1alpha1" .PHONY: generate # Generate DeepCopy and runtime.Object implementation methods. generate: "$(CONTROLLER_GEN)" "$(CONTROLLER_GEN)" \ object:headerFile="hack/boilerplate.txt" \ - paths="./pkg/api/configsync/v1alpha1" \ - paths="./pkg/api/configsync/v1beta1" \ - paths="./pkg/api/kpt.dev/v1alpha1" \ - paths="./pkg/api/configmanagement/v1" + $(CONTROLLER_GEN_PATHS) .PHONY: configsync-crds # Generate configsync CRDs and then patch them with kustomize configsync-crds: "$(CONTROLLER_GEN)" "$(KUSTOMIZE)" "$(ADDLICENSE)" "$(CONTROLLER_GEN)" crd \ - paths="./pkg/api/configsync/v1alpha1" \ - paths="./pkg/api/configsync/v1beta1" \ - paths="./pkg/api/configmanagement/v1" \ - paths="./pkg/api/kpt.dev/v1alpha1" \ + $(CONTROLLER_GEN_PATHS) \ output:artifacts:config=./manifests \ && mv ./manifests/configsync.gke.io_reposyncs.yaml ./manifests/patch/reposync-crd.yaml \ && mv ./manifests/configsync.gke.io_rootsyncs.yaml ./manifests/patch/rootsync-crd.yaml \ @@ -51,15 +50,3 @@ install-controller-gen: "$(CONTROLLER_GEN)" .PHONY: clean-controller-gen clean-controller-gen: @rm -rf $(CONTROLLER_GEN) - -.PHONY: generate-in-docker -# Run make generate-in-docker in the docker buildenv container -generate-in-docker: buildenv-dirs - @docker run $(DOCKER_RUN_ARGS) \ - make generate - -.PHONY: configsync-crds-in-docker -# Run make configsync-crds in the docker buildenv container -configsync-crds-in-docker: buildenv-dirs - @docker run $(DOCKER_RUN_ARGS) \ - make configsync-crds