Skip to content

Commit

Permalink
Merge fixup: Fix CIs
Browse files Browse the repository at this point in the history
Swap test-e2e and e2e
Add -mod=mod to local builds of tools

Signed-off-by: Todd Short <[email protected]>
  • Loading branch information
tmshort committed Feb 28, 2023
1 parent cf4f0ca commit 57e2f0d
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,9 @@ lint: golangci-lint ## Run golangci linter

tidy: ## Update dependencies
$(Q)go mod tidy
$(Q)(cd $(TOOLS_DIR) && go mod tidy)

fmt: ## Format Go code
$(Q)go fmt ./...
$(Q)(cd $(TOOLS_DIR) && go fmt $$(go list -tags=tools ./...))

clean: ## Remove binaries and test artifacts
@rm -rf bin
Expand Down Expand Up @@ -109,11 +107,11 @@ test-unit: envtest ## Run the unit tests

FOCUS := $(if $(TEST),-v -focus "$(TEST)")
E2E_FLAGS ?= ""
test-e2e: ginkgo ## Run the e2e tests
e2e: ginkgo ## Run the e2e tests
$(GINKGO) --tags $(GO_BUILD_TAGS) $(E2E_FLAGS) -trace -progress $(FOCUS) test/e2e

e2e: KIND_CLUSTER_NAME=rukpak-e2e
e2e: rukpakctl run image-registry local-git kind-load-bundles registry-load-bundles test-e2e kind-cluster-cleanup ## Run e2e tests against an ephemeral kind cluster
test-e2e: KIND_CLUSTER_NAME=rukpak-e2e
test-e2e: rukpakctl run image-registry local-git kind-load-bundles registry-load-bundles e2e kind-cluster-cleanup ## Run e2e tests against an ephemeral kind cluster

kind-cluster: kind kind-cluster-cleanup ## Standup a kind cluster
$(KIND) create cluster --name ${KIND_CLUSTER_NAME}
Expand Down Expand Up @@ -253,14 +251,14 @@ goreleaser: $(GORELEASER) ## Builds a local copy of goreleaser
kind: $(KIND) ## Builds a local copy of kind

$(CONTROLLER_GEN): $(TOOLS_DIR)/go.mod # Build controller-gen from tools folder.
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen
cd $(TOOLS_DIR); go build -mod=mod -tags=tools -o $(BIN_DIR)/controller-gen sigs.k8s.io/controller-tools/cmd/controller-gen
$(GINKGO): $(TOOLS_DIR)/go.mod # Build ginkgo from tools folder.
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/ginkgo github.com/onsi/ginkgo/v2/ginkgo
cd $(TOOLS_DIR); go build -mod=mod -tags=tools -o $(BIN_DIR)/ginkgo github.com/onsi/ginkgo/v2/ginkgo
$(GOLANGCI_LINT): $(TOOLS_DIR)/go.mod # Build golangci-lint from tools folder.
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
cd $(TOOLS_DIR); go build -mod=mod -tags=tools -o $(BIN_DIR)/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
$(SETUP_ENVTEST): $(TOOLS_DIR)/go.mod # Build setup-envtest from tools folder.
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/setup-envtest sigs.k8s.io/controller-runtime/tools/setup-envtest
cd $(TOOLS_DIR); go build -mod=mod -tags=tools -o $(BIN_DIR)/setup-envtest sigs.k8s.io/controller-runtime/tools/setup-envtest
$(GORELEASER): $(TOOLS_DIR)/go.mod # Build goreleaser from tools folder.
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/goreleaser github.com/goreleaser/goreleaser
cd $(TOOLS_DIR); go build -mod=mod -tags=tools -o $(BIN_DIR)/goreleaser github.com/goreleaser/goreleaser
$(KIND): $(TOOLS_DIR)/go.mod
cd $(TOOLS_DIR); go build -tags=tools -o $(BIN_DIR)/kind sigs.k8s.io/kind
cd $(TOOLS_DIR); go build -mod=mod -tags=tools -o $(BIN_DIR)/kind sigs.k8s.io/kind

0 comments on commit 57e2f0d

Please sign in to comment.