-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
executable file
·91 lines (69 loc) · 2.91 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
#Copyright 2023 The WASP Authors.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
.PHONY: manifests \
cluster-up cluster-down cluster-sync \
test test-functional test-unit test-lint \
publish \
wasp \
fmt \
goveralls \
release-description \
bazel-build-images push-images \
fossa
all: build
build: wasp manifest-generator
ifeq ($(origin KUBEVIRT_RELEASE), undefined)
KUBEVIRT_RELEASE="latest_nightly"
endif
all: manifests build-images
manifests:
hack/build/bazel-docker.sh "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} VERBOSITY=${VERBOSITY} PULL_POLICY=${PULL_POLICY} CR_NAME=${CR_NAME} WASP_NAMESPACE=${WASP_NAMESPACE} MAX_AVERAGE_SWAPIN_PAGES_PER_SECOND=${MAX_AVERAGE_SWAPIN_PAGES_PER_SECOND} MAX_AVERAGE_SWAPOUT_PAGES_PER_SECOND=${MAX_AVERAGE_SWAPOUT_PAGES_PER_SECOND} SWAP_UTILIZATION_THRESHOLD_FACTOR=${SWAP_UTILIZATION_THRESHOLD_FACTOR} AVERAGE_WINDOW_SIZE_SECONDS=${AVERAGE_WINDOW_SIZE_SECONDS} DEPLOY_PROMETHEUS_RULE=${DEPLOY_PROMETHEUS_RULE} ./hack/build/build-manifests.sh"
builder-push:
./hack/build/build-builder.sh
cluster-up:
eval "KUBEVIRT_RELEASE=${KUBEVIRT_RELEASE} KUBEVIRT_SWAP_ON=true ./cluster-up/up.sh"
cluster-down:
./cluster-up/down.sh
push-images:
eval "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} ./hack/build/build-docker.sh push"
build-images:
eval "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} ./hack/build/build-docker.sh"
push: build-images push-images
cluster-clean-wasp:
./cluster-sync/clean.sh
cluster-sync: cluster-clean-wasp
./cluster-sync/sync.sh WASP_AVAILABLE_TIMEOUT=${WASP_AVAILABLE_TIMEOUT} DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} PULL_POLICY=${PULL_POLICY} WASP_NAMESPACE=${WASP_NAMESPACE}
test: WHAT = ./pkg/... ./cmd/...
test: bootstrap-ginkgo
hack/build/bazel-docker.sh "ACK_GINKGO_DEPRECATIONS=${ACK_GINKGO_DEPRECATIONS} ./hack/build/run-unit-tests.sh ${WHAT}"
build-functest:
hack/build/bazel-docker.sh ./hack/build/build-functest.sh
functest: WHAT = ./tests/...
functest: build-functest
./hack/build/run-functional-tests.sh ${WHAT} "${TEST_ARGS}"
bootstrap-ginkgo:
hack/build/bazel-docker.sh ./hack/build/bootstrap-ginkgo.sh
manifest-generator:
GO111MODULE=${GO111MODULE:-off} go build -o manifest-generator -v tools/manifest-generator/*.go
wasp:
go build -o wasp -v cmd/wasp/*.go
chmod 777 wasp
release-description:
./hack/build/release-description.sh ${RELREF} ${PREREF}
clean:
rm ./wasp -f
fmt:
go fmt .
run: build
sudo ./wasp