forked from openshift/assisted-installer-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (36 loc) · 1.65 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
TAG := $(or $(TAG),latest)
ASSISTED_INSTALLER_AGENT := $(or ${ASSISTED_INSTALLER_AGENT},quay.io/ocpmetal/assisted-installer-agent:$(TAG))
all: build
.PHONY: build clean build-image push subsystem agent-build hardware-info-build connectivity-check-build inventory-build logs-sender-build
build: agent-build hardware-info-build connectivity-check-build inventory-build free-addresses-build logs-sender-build
agent-build : src/agent/main/main.go
mkdir -p build
CGO_ENABLED=0 go build -o build/agent src/agent/main/main.go
connectivity-check-build : src/connectivity_check/main/main.go
mkdir -p build
CGO_ENABLED=0 go build -o build/connectivity_check src/connectivity_check/main/main.go
inventory-build : src/inventory
mkdir -p build
CGO_ENABLED=0 go build -o build/inventory src/inventory/main/main.go
free-addresses-build: src/free_addresses
mkdir -p build
CGO_ENABLED=0 go build -o build/free_addresses src/free_addresses/main/main.go
logs-sender-build: src/logs_sender
mkdir -p build
CGO_ENABLED=0 go build -o build/logs_sender src/logs_sender/main/main.go
clean:
rm -rf build subsystem/logs
build-image: unittest build
docker build -f Dockerfile.assisted_installer_agent . -t $(ASSISTED_INSTALLER_AGENT)
push: build-image subsystem
docker push $(ASSISTED_INSTALLER_AGENT)
unittest:
go test -v $(shell go list ./... | grep -v subsystem) -cover
subsystem: build-image
cd subsystem; docker-compose up -d
go test -v ./subsystem/... -count=1 -ginkgo.focus=${FOCUS} -ginkgo.v -ginkgo.skip="system-test" || ( cd subsystem; docker-compose down && /bin/false)
cd subsystem; docker-compose down
generate:
go generate $(shell go list ./...)
go-import:
goimports -w -l .