forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
178 lines (130 loc) · 5.46 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
export GO15VENDOREXPERIMENT := 1
all:
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} ./hack/build-manifests.sh && \
hack/bazel-fmt.sh && hack/bazel-build.sh"
go-all:
hack/dockerized "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 "hack/bazel-fmt.sh && hack/bazel-build.sh"
bazel-build-verify: TARGET_TO_RUN='make'
bazel-build-verify: bazel-build check-git-tree-state build-verify bazel-test
bazel-build-images:
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} DOCKER_TAG_ALT=${DOCKER_TAG_ALT} IMAGE_PREFIX=${IMAGE_PREFIX} IMAGE_PREFIX_ALT=${IMAGE_PREFIX_ALT} ./hack/bazel-build-images.sh"
bazel-push-images:
hack/dockerized "hack/bazel-fmt.sh && DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} DOCKER_TAG_ALT=${DOCKER_TAG_ALT} IMAGE_PREFIX=${IMAGE_PREFIX} IMAGE_PREFIX_ALT=${IMAGE_PREFIX_ALT} KUBEVIRT_PROVIDER=${KUBEVIRT_PROVIDER} PUSH_TARGETS='${PUSH_TARGETS}' ./hack/bazel-push-images.sh"
push: bazel-push-images
check-git-tree-state:
ifneq ($(strip $(shell git status --porcelain 2>/dev/null)),)
$(error git tree is not clean, you probably need to run '${TARGET_TO_RUN}' and commit the changes)
endif
check-for-binaries:
hack/check-for-binaries.sh
bazel-test:
hack/dockerized "hack/bazel-fmt.sh && hack/bazel-test.sh"
generate:
hack/dockerized "DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} ./hack/generate.sh"
SYNC_VENDOR=true hack/dockerized "./hack/bazel-generate.sh && hack/bazel-fmt.sh"
hack/sync-kubevirtci.sh
generate-verify: TARGET_TO_RUN='make generate'
generate-verify: generate check-for-binaries check-git-tree-state
apidocs:
hack/dockerized "./hack/generate.sh && ./hack/gen-swagger-doc/gen-swagger-docs.sh v1 html"
client-python: generate
hack/dockerized "TRAVIS_TAG=${TRAVIS_TAG} ./hack/gen-client-python/generate.sh"
go-build:
hack/dockerized "KUBEVIRT_VERSION=${KUBEVIRT_VERSION} ./hack/build-go.sh install ${WHAT}" && ./hack/build-copy-artifacts.sh ${WHAT}
coverage:
hack/dockerized "./hack/coverage.sh ${WHAT}"
goveralls: go-build
SYNC_OUT=false hack/dockerized "TRAVIS_JOB_ID=${TRAVIS_JOB_ID} TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST} TRAVIS_BRANCH=${TRAVIS_BRANCH} ./hack/goveralls.sh"
go-test: go-build
SYNC_OUT=false hack/dockerized "./hack/build-go.sh test ${WHAT}"
test: bazel-test
functest:
hack/dockerized "hack/build-func-tests.sh"
hack/functests.sh
dump: bazel-build
hack/dump.sh
functest-image-build:
hack/func-tests-image.sh build
functest-image-push: functest-image-build
hack/func-tests-image.sh push
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/manifest-templator tools/vms-generator/vms-generator tools/marketplace/marketplace
distclean: clean
hack/dockerized "rm -rf vendor/ && rm -f go.sum && GO111MODULE=on go clean -modcache"
rm -rf vendor/
deps-update-patch:
SYNC_VENDOR=true hack/dockerized " ./hack/dep-update.sh -u=patch && ./hack/dep-prune.sh && ./hack/bazel-generate.sh"
deps-update:
SYNC_VENDOR=true hack/dockerized " ./hack/dep-update.sh && ./hack/dep-prune.sh && ./hack/bazel-generate.sh"
build-verify:
hack/build-verify.sh
manifests:
hack/dockerized "CSV_VERSION=${CSV_VERSION} QUAY_REPOSITORY=${QUAY_REPOSITORY} \
DOCKER_PREFIX=${DOCKER_PREFIX} DOCKER_TAG=${DOCKER_TAG} \
IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} VERBOSITY=${VERBOSITY} PACKAGE_NAME=${PACKAGE_NAME} \
KUBEVIRT_INSTALLED_NAMESPACE=${KUBEVIRT_INSTALLED_NAMESPACE} ./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/up.sh
cluster-down:
./cluster-up/down.sh
cluster-build:
./hack/cluster-build.sh
cluster-clean:
./hack/cluster-clean.sh
cluster-deploy: cluster-clean
./hack/cluster-deploy.sh
cluster-sync: cluster-build cluster-deploy
builder-build:
./hack/builder/build.sh
builder-publish:
./hack/builder/publish.sh
olm-verify:
hack/dockerized "./hack/olm.sh verify"
current-dir := $(shell pwd)
build-prom-spec-dumper:
hack/dockerized "go build -o rule-spec-dumper ./hack/prom-rule-ci/rule-spec-dumper.go"
prom-rules-verify: build-prom-spec-dumper
./hack/prom-rule-ci/verify-rules.sh \
"${current-dir}/rule-spec-dumper" \
"${current-dir}/hack/prom-rule-ci/prom-rules-tests.yaml"
olm-push:
hack/dockerized "DOCKER_TAG=${DOCKER_TAG} CSV_VERSION=${CSV_VERSION} QUAY_USERNAME=${QUAY_USERNAME} \
QUAY_PASSWORD=${QUAY_PASSWORD} QUAY_REPOSITORY=${QUAY_REPOSITORY} PACKAGE_NAME=${PACKAGE_NAME} ./hack/olm.sh push"
bump-kubevirtci:
./hack/bump-kubevirtci.sh
.PHONY: \
build-verify \
go-build \
go-test \
go-all \
bazel-generate \
bazel-build \
bazel-build-images \
bazel-push-images \
bazel-test \
functest-image-build \
functest-image-push \
test \
clean \
distclean \
sync \
manifests \
functest \
release-announce \
cluster-up \
cluster-down \
cluster-clean \
cluster-deploy \
cluster-sync \
olm-verify \
olm-push