forked from flyteorg/flyte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
118 lines (95 loc) · 3.76 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
export REPOSITORY=flyte
include boilerplate/flyte/end2end/Makefile
include boilerplate/flyte/golang_test_targets/Makefile
define PIP_COMPILE
pip-compile $(1) --upgrade --verbose --resolver=backtracking --annotation-style=line
endef
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: cmd/single/dist
cmd/single/dist: export FLYTECONSOLE_VERSION ?= latest
cmd/single/dist:
script/get_flyteconsole_dist.sh
.PHONY: compile
compile: cmd/single/dist
go build -tags console -v -o flyte -ldflags=$(LD_FLAGS) ./cmd/
mv ./flyte ${GOPATH}/bin || echo "Skipped copying 'flyte' to ${GOPATH}/bin"
.PHONY: linux_compile
linux_compile: cmd/single/dist
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -tags console -v -o /artifacts/flyte -ldflags=$(LD_FLAGS) ./cmd/
.PHONY: update_boilerplate
update_boilerplate:
@boilerplate/update.sh
.PHONY: kustomize
kustomize:
KUSTOMIZE_VERSION=3.9.2 bash script/generate_kustomize.sh
.PHONY: helm
helm: ## Generate K8s Manifest from Helm Charts.
bash script/generate_helm.sh
make -C docker/sandbox-bundled manifests
.PHONY: release_automation
release_automation:
mkdir -p release
bash script/release.sh
bash script/generate_config_docs.sh
$(MAKE) -C docker/sandbox-bundled manifests
.PHONY: deploy_sandbox
deploy_sandbox:
bash script/deploy.sh
.PHONY: install-piptools
install-piptools: ## Install pip-tools
pip install -U pip-tools
.PHONY: install-conda-lock
install-conda-lock:
pip install conda-lock
.PHONY: conda-lock
conda-lock: install-conda-lock
conda-lock -f monodocs-environment.yaml --without-cuda --lockfile monodocs-environment.lock.yaml
.PHONY: stats
stats:
@generate-dashboard -o deployment/stats/prometheus/flytepropeller-dashboard.json stats/flytepropeller.dashboard.py
@generate-dashboard -o deployment/stats/prometheus/flyteadmin-dashboard.json stats/flyteadmin.dashboard.py
@generate-dashboard -o deployment/stats/prometheus/flyteuser-dashboard.json stats/flyteuser.dashboard.py
.PHONY: prepare_artifacts
prepare_artifacts:
bash script/prepare_artifacts.sh
.PHONE: helm_update
helm_update: ## Update helm charts' dependencies.
helm dep update ./charts/flyte/
.PHONY: helm_install
helm_install: ## Install helm charts
helm install flyte --debug ./charts/flyte -f ./charts/flyte/values.yaml --create-namespace --namespace=flyte
.PHONY: helm_upgrade
helm_upgrade: ## Upgrade helm charts
helm upgrade flyte --debug ./charts/flyte -f ./charts/flyte/values.yaml --create-namespace --namespace=flyte
.PHONY: docs
docs:
make -C docs clean html SPHINXOPTS=-W
.PHONY: help
help: SHELL := /bin/sh
help: ## List available commands and their usage
@awk 'BEGIN {FS = ":.*?##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 } ' $(MAKEFILE_LIST)
.PHONY: setup_local_dev
setup_local_dev: ## Sets up k3d cluster with Flyte dependencies for local development
@bash script/setup_local_dev.sh
# This builds the flyte binary image for whatever architecture you're on. Don't push this image to the official
# registry because we need those to be multi-arch.
.PHONY: build_native_flyte
build_native_flyte: FLYTECONSOLE_VERSION := latest
build_native_flyte:
docker build \
--build-arg FLYTECONSOLE_VERSION=$(FLYTECONSOLE_VERSION) \
--tag flyte-binary:native .
.PHONY: go-tidy
go-tidy:
go mod tidy
make -C datacatalog go-tidy
make -C flyteadmin go-tidy
make -C flyteidl go-tidy
make -C flytepropeller go-tidy
make -C flyteplugins go-tidy
make -C flytestdlib go-tidy
make -C flytecopilot go-tidy