forked from flyteorg/flyteadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
73 lines (53 loc) · 2.29 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
export REPOSITORY=flyteadmin
export FLYTE_SCHEDULER_REPOSITORY=flytescheduler
include boilerplate/flyte/docker_build/Makefile
include boilerplate/flyte/golang_test_targets/Makefile
include boilerplate/flyte/end2end/Makefile
GIT_VERSION := $(shell git describe --always --tags)
GIT_HASH := $(shell git rev-parse --short HEAD)
TIMESTAMP := $(shell date '+%Y-%m-%d')
PACKAGE ?=github.com/flyteorg/flytestdlib
LD_FLAGS="-s -w -X $(PACKAGE)/version.Version=$(GIT_VERSION) -X $(PACKAGE)/version.Build=$(GIT_HASH) -X $(PACKAGE)/version.BuildTime=$(TIMESTAMP)"
.PHONY: update_boilerplate
update_boilerplate:
@curl https://raw.githubusercontent.com/flyteorg/boilerplate/master/boilerplate/update.sh -o boilerplate/update.sh
@boilerplate/update.sh
.PHONY: docker_build_scheduler
docker_build_scheduler:
docker build -t $$FLYTE_SCHEDULER_REPOSITORY:$(GIT_HASH) -f Dockerfile.scheduler .
.PHONY: integration
integration:
CGO_ENABLED=0 GOFLAGS="-count=1" go test -v -tags=integration ./tests/...
.PHONY: k8s_integration
k8s_integration:
@script/integration/launch.sh
.PHONY: k8s_integration_execute
k8s_integration_execute:
@script/integration/execute.sh
.PHONY: compile
compile:
go build -o flyteadmin -ldflags=$(LD_FLAGS) ./cmd/ && mv ./flyteadmin ${GOPATH}/bin
.PHONY: compile_scheduler
compile_scheduler:
go build -o flytescheduler -ldflags=$(LD_FLAGS) ./cmd/scheduler/ && mv ./flytescheduler ${GOPATH}/bin
.PHONY: linux_compile
linux_compile:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/flyteadmin -ldflags=$(LD_FLAGS) ./cmd/
.PHONY: linux_compile_scheduler
linux_compile_scheduler:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/flytescheduler -ldflags=$(LD_FLAGS) ./cmd/scheduler/
.PHONY: server
server:
go run cmd/main.go serve --server.kube-config ~/.kube/config --config flyteadmin_config.yaml
.PHONY: scheduler
scheduler:
go run scheduler/main.go run --server.kube-config ~/.kube/config --config flyteadmin_config.yaml
.PHONY: migrate
migrate:
go run cmd/main.go migrate run --server.kube-config ~/.kube/config --config flyteadmin_config.yaml
.PHONY: seed_projects
seed_projects:
go run cmd/main.go migrate seed-projects project admintests flytekit --server.kube-config ~/.kube/config --config flyteadmin_config.yaml
all: compile
generate: download_tooling
@go generate ./...