Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Infer GOOS and GOARCH from environment
Browse files Browse the repository at this point in the history
Signed-off-by: Jeev B <[email protected]>
  • Loading branch information
jeevb committed Apr 11, 2023
1 parent eb695b1 commit 9b300e2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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

0 comments on commit 9b300e2

Please sign in to comment.