This repository was archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (48 loc) · 1.89 KB
/
Makefile
File metadata and controls
58 lines (48 loc) · 1.89 KB
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
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2019-2020 Intel Corporation
export GO111MODULE = on
.PHONY: \
clean \
networkedge \
lint test help build
COPY_DOCKERFILES := $(shell /usr/bin/cp -rfT ./build/ ./dist/)
VER ?= 1.0
help:
@echo "Please use \`make <target>\` where <target> is one of"
@echo ""
@echo "Build all the required Docker images for OpenNESS' deployment mode:"
@echo " networkedge to build components of Network Edge deployment (Edge DNS Service, Certificate Signer)"
@echo ""
@echo "Helper targets:"
@echo " clean to clean build artifacts"
@echo " lint to run linter on Go code"
@echo " test to run tests on Go code"
@echo " test-cov to run coverage tests on Go code"
@echo " help to show this message"
@echo " build to build all executables without images"
@echo ""
@echo "Single targets:"
@echo " certsigner to build only docker image of the Certificate Signer"
networkedge: certsigner certrequester
clean:
rm -rf ./dist
test:
http_proxy= https_proxy= HTTP_PROXY= HTTPS_PROXY= ginkgo -v -r -gcflags=-l --randomizeSuites --failOnPending --skipPackage=vendor,edgednscli
test-cov:
rm -rf coverage.out*
http_proxy= https_proxy= HTTP_PROXY= HTTPS_PROXY= ginkgo -v -r --randomizeSuites --failOnPending --skipPackage=vendor,edgednscli \
-gcflags=-l -cover -coverprofile=coverage.out -outputdir=.
sed '1!{/^mode/d;}' coverage.out > coverage.out.fix
go tool cover -html=coverage.out.fix
certsigner:
CGO_ENABLED=0 GOOS=linux GARCH=amd64 go build -o ./dist/$@/$@ ./cmd/$@
ifndef SKIP_DOCKER_IMAGES
VER=${VER} docker-compose build $@
endif
certrequester:
CGO_ENABLED=0 GOOS=linux GARCH=amd64 go build -o ./dist/$@/$@ ./cmd/$@
ifndef SKIP_DOCKER_IMAGES
VER=${VER} docker-compose build $@
endif
build:
$(MAKE) SKIP_DOCKER_IMAGES=1 networkedge