forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
137 lines (101 loc) · 3.82 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
export GO15VENDOREXPERIMENT := 1
all:
hack/dockerized "./hack/check.sh && KUBEVIRT_VERSION=${KUBEVIRT_VERSION} ./hack/build-go.sh install ${WHAT} && ./hack/build-copy-artifacts.sh ${WHAT} && DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} ./hack/build-manifests.sh"
bazel-generate:
SYNC_VENDOR=true hack/dockerized "./hack/bazel-generate.sh"
bazel-build:
hack/dockerized "bazel build \
--platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 \
--workspace_status_command=./hack/print-workspace-status.sh \
//cmd/..."
bazel-build-images:
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} DOCKER_TAG_ALT=${DOCKER_TAG_ALT} ./hack/bazel-build-images.sh"
bazel-push-images:
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} DOCKER_TAG_ALT=${DOCKER_TAG_ALT} ./hack/bazel-push-images.sh"
bazel-tests:
hack/dockerized "bazel test --test_output=errors -- //pkg/... "
generate: bazel-generate
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} ./hack/generate.sh"
apidocs:
hack/dockerized "./hack/generate.sh && ./hack/gen-swagger-doc/gen-swagger-docs.sh v1 html"
client-python:
hack/dockerized "./hack/generate.sh && TRAVIS_TAG=${TRAVIS_TAG} ./hack/gen-client-python/generate.sh"
build:
hack/dockerized "./hack/check.sh && KUBEVIRT_VERSION=${KUBEVIRT_VERSION} ./hack/build-go.sh install ${WHAT}" && ./hack/build-copy-artifacts.sh ${WHAT}
coverage:
hack/dockerized "./hack/check.sh && ./hack/coverage.sh ${WHAT}"
goveralls:
SYNC_OUT=false hack/dockerized "./hack/check.sh && TRAVIS_JOB_ID=${TRAVIS_JOB_ID} TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} TRAVIS_BRANCH=${TRAVIS_BRANCH} ./hack/goveralls.sh"
test:
SYNC_OUT=false hack/dockerized "./hack/check.sh && ./hack/build-go.sh test ${WHAT}"
functest:
hack/dockerized "hack/build-func-tests.sh"
hack/functests.sh
clean:
hack/dockerized "./hack/build-go.sh clean ${WHAT} && rm _out/* -rf"
hack/dockerized "bazel clean --expunge"
rm -f tools/openapispec/openapispec tools/resource-generator/resource-generator tools/manifest-templator/manifests-templator tools/vms-generator/vms-generator
distclean: clean
hack/dockerized "rm -rf vendor/ && rm -f .glide.*.hash && glide cc"
rm -rf vendor/
deps-install:
SYNC_VENDOR=true hack/dockerized "glide install --strip-vendor && ./hack/bazel-generate.sh"
hack/dep-prune.sh
deps-update:
SYNC_VENDOR=true hack/dockerized "glide cc && glide update --strip-vendor && ./hack/bazel-generate.sh"
hack/dep-prune.sh
docker: build
hack/build-docker.sh build ${WHAT}
push: docker
hack/build-docker.sh push ${WHAT}
push-cache: docker verify-build
hack/build-docker.sh push-cache ${WHAT}
pull-cache:
hack/build-docker.sh pull-cache ${WHAT}
publish: docker verify-build
hack/build-docker.sh push ${WHAT}
verify-build:
hack/verify-build.sh
manifests:
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} ./hack/build-manifests.sh"
.release-functest:
make functest > .release-functest 2>&1
release-announce: .release-functest
./hack/release-announce.sh $(RELREF) $(PREREF)
cluster-up:
./cluster/up.sh
cluster-down:
./cluster/down.sh
cluster-build:
./cluster/build.sh
cluster-clean:
./cluster/clean.sh
cluster-deploy: cluster-clean
./cluster/deploy.sh
cluster-sync: cluster-build cluster-deploy
builder-build:
./hack/builder/build.sh
builder-publish:
./hack/builder/publish.sh
.PHONY: \
bazel-generate \
bazel-build \
bazel-build-images \
bazel-push-images \
bazel-tests \
build \
test \
clean \
distclean \
checksync \
sync \
docker \
manifests \
publish \
functest \
release-announce \
cluster-up \
cluster-down \
cluster-clean \
cluster-deploy \
cluster-sync