From 9b300e2a135227bd1124a7bd2aa99121ecda69f2 Mon Sep 17 00:00:00 2001 From: Jeev B Date: Tue, 11 Apr 2023 09:02:20 -0700 Subject: [PATCH] Infer GOOS and GOARCH from environment Signed-off-by: Jeev B --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9b80b7030..331cfb4d0 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,10 @@ docker_build_scheduler: docker build -t $$FLYTE_SCHEDULER_REPOSITORY:$(GIT_HASH) -f Dockerfile.scheduler . .PHONY: integration +integration: export CGO_ENABLED = 0 +integration: export GOFLAGS = -count=1 integration: - CGO_ENABLED=0 GOFLAGS="-count=1" go test -v -tags=integration ./tests/... + go test -v -tags=integration ./tests/... .PHONY: k8s_integration k8s_integration: @@ -51,12 +53,16 @@ compile_scheduler_debug: .PHONY: linux_compile +linux_compile: export CGO_ENABLED = 0 +linux_compile: export GOOS = linux linux_compile: - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/flyteadmin -ldflags=$(LD_FLAGS) ./cmd/ + go build -o /artifacts/flyteadmin -ldflags=$(LD_FLAGS) ./cmd/ .PHONY: linux_compile_scheduler +linux_compile_scheduler: export CGO_ENABLED = 0 +linux_compile_scheduler: export GOOS = linux linux_compile_scheduler: - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/flytescheduler -ldflags=$(LD_FLAGS) ./cmd/scheduler/ + go build -o /artifacts/flytescheduler -ldflags=$(LD_FLAGS) ./cmd/scheduler/ .PHONY: server @@ -77,4 +83,3 @@ seed_projects: go run cmd/main.go migrate seed-projects project admintests flytekit --server.kube-config ~/.kube/config --config flyteadmin_config.yaml all: compile -