forked from openshift-kni/cnf-features-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
80 lines (60 loc) · 1.85 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
#TODO add default features here
export FEATURES?=sctp performance xt_u32
IMAGE_BUILD_CMD ?= "docker"
# The environment represents the kustomize patches to apply when deploying the features
export FEATURES_ENVIRONMENT?=deploy
.PHONY: deps-update \
functests \
gofmt \
golint \
govet \
ci-job \
feature-deploy \
cnf-tests-local \
test-bin
TARGET_GOOS=linux
TARGET_GOARCH=amd64
CACHE_DIR="_cache"
TOOLS_DIR="$(CACHE_DIR)/tools"
$(shell mkdir -p $(TOOLS_DIR))
# Export GO111MODULE=on to enable project to be built from within GOPATH/src
export GO111MODULE=on
deps-update:
go mod tidy && \
go mod vendor
functests:
@echo "Running Functional Tests"
FEATURES="$(FEATURES)" hack/run-functests.sh
functests-on-ci: setup-test-cluster feature-deploy feature-wait functests
gofmt:
@echo "Running gofmt"
gofmt -s -l `find . -path ./vendor -prune -o -type f -name '*.go' -print`
golint:
@echo "Running go lint"
hack/lint.sh
govet:
@echo "Running go vet"
# Disabling GO111MODULE just for go vet execution
GO111MODULE=off go vet github.com/openshift-kni/cnf-features-deploy/functests/...
ci-job: gofmt golint govet check-tests-nodesc
feature-deploy:
FEATURES_ENVIRONMENT=$(FEATURES_ENVIRONMENT) FEATURES="$(FEATURES)" hack/feature-deploy.sh
setup-test-cluster:
@echo "Setting up test cluster"
hack/setup-test-cluster.sh
feature-wait:
@echo "Waiting for features"
FEATURES="$(FEATURES)" hack/feature-wait.sh
test-bin:
@echo "Making test binary"
hack/build-test-bin.sh
cnf-tests-local:
@echo "Making cnf-tests local"
$(IMAGE_BUILD_CMD) build --no-cache -f cnf-tests/Dockerfile -t cnf-tests-local .
$(IMAGE_BUILD_CMD) build --no-cache -f tools/s2i-dpdk/Dockerfile -t dpdk tools/s2i-dpdk/
check-tests-nodesc:
@echo "Checking undocumented cnf tests"
hack/fill-empty-docs.sh
generate-cnf-tests-doc:
@echo "Generating cnf tests doc"
hack/generate-cnf-docs.sh