forked from kubeedge/kubeedge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
138 lines (114 loc) · 3.34 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
# make all builds both cloud and edge binaries
.PHONY: all
ifeq ($(WHAT),)
all:
cd cloud && $(MAKE)
cd edge && $(MAKE)
cd keadm && $(MAKE)
cd edgesite && $(MAKE)
else ifeq ($(WHAT),cloud)
# make all what=cloud, build cloud binary
all:
cd cloud && $(MAKE)
else ifeq ($(WHAT),edge)
all:
# make all what=edge, build edge binary
cd edge && $(MAKE)
else ifeq ($(WHAT),edgesite)
all:
$(MAKE) -C edgesite
else ifeq ($(WHAT),keadm)
all:
# make all what=edge, build edge binary
cd keadm && $(MAKE)
else
# invalid entry
all:
@echo $S"invalid option please choose to build either cloud, edge, keadm, edgesite or all together"
endif
# unit tests
.PHONY: edge_test
edge_test:
cd edge && $(MAKE) test
.PHONY: cloud_test
cloud_test:
$(MAKE) -C cloud test
# lint
.PHONY: edge_lint
edge_lint:
cd edge && $(MAKE) lint
.PHONY: edge_integration_test
edge_integration_test:
cd edge && $(MAKE) integration_test
.PHONY: edge_cross_build
edge_cross_build:
cd edge && $(MAKE) cross_build
.PHONY: edge_cross_build_v7
edge_cross_build_v7:
$(MAKE) -C edge armv7
.PHONY: edge_cross_build_v8
edge_cross_build_v8:
$(MAKE) -C edge armv8
.PHONY: edgesite_cross_build
edgesite_cross_build:
$(MAKE) -C edgesite cross_build
.PHONY: edge_small_build
edge_small_build:
cd edge && $(MAKE) small_build
.PHONY: edgesite_cross_build_v7
edgesite_cross_build_v7:
$(MAKE) -C edgesite armv7
.PHONY: edgesite_cross_build_v8
edgesite_cross_build_v8:
$(MAKE) -C edgesite armv8
.PHONY: cloud_lint
cloud_lint:
cd cloud && $(MAKE) lint
.PHONY: e2e_test
e2e_test:
# bash tests/e2e/scripts/execute.sh device_crd
# This has been commented temporarily since there is an issue of CI using same master for all PRs, which is causing failures when run parallely
bash tests/e2e/scripts/execute.sh
.PHONY: performance_test
performance_test:
bash tests/performance/scripts/jenkins.sh
IMAGE_TAG ?= $(shell git describe --tags)
.PHONY: cloudimage
cloudimage:
docker build -t kubeedge/cloudcore:${IMAGE_TAG} -f build/cloud/Dockerfile .
.PHONY: keadm_lint
keadm_lint:
make -C keadm lint
QEMU_ARCH ?= x86_64
ARCH ?= amd64
.PHONY: edgeimage
edgeimage:
mkdir -p ./build/edge/tmp
rm -rf ./build/edge/tmp/*
curl -L -o ./build/edge/tmp/qemu-${QEMU_ARCH}-static.tar.gz https://github.com/multiarch/qemu-user-static/releases/download/v3.0.0/qemu-${QEMU_ARCH}-static.tar.gz
tar -xzf ./build/edge/tmp/qemu-${QEMU_ARCH}-static.tar.gz -C ./build/edge/tmp
docker build -t kubeedge/edgecore:${IMAGE_TAG} \
--build-arg BUILD_FROM=${ARCH}/golang:1.12-alpine3.9 \
--build-arg RUN_FROM=${ARCH}/docker:dind \
-f build/edge/Dockerfile .
.PHONY: edgesiteimage
edgesiteimage:
mkdir -p ./build/edgesite/tmp
rm -rf ./build/edgesite/tmp/*
curl -L -o ./build/edgesite/tmp/qemu-${QEMU_ARCH}-static.tar.gz https://github.com/multiarch/qemu-user-static/releases/download/v3.0.0/qemu-${QEMU_ARCH}-static.tar.gz
tar -xzf ./build/edgesite/tmp/qemu-${QEMU_ARCH}-static.tar.gz -C ./build/edgesite/tmp
docker build -t kubeedge/edgesite:${IMAGE_TAG} \
--build-arg BUILD_FROM=${ARCH}/golang:1.12-alpine3.9 \
--build-arg RUN_FROM=${ARCH}/docker:dind \
-f build/edgesite/Dockerfile .
.PHONY: depcheck
depcheck:
dep check
.PHONY: bluetoothdevice
bluetoothdevice:
make -C mappers/bluetooth_mapper
.PHONY: bluetoothdevice_image
make -C mappers/bluetooth_mapper_docker
.PHONY: bluetoothdevice_lint
bluetoothdevice_lint:
make -C mappers/bluetooth_mapper lint