-
Notifications
You must be signed in to change notification settings - Fork 130
/
Makefile
executable file
·87 lines (69 loc) · 2.43 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
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
# -------------------------------------------------------------
# This makefile defines the following targets
#
# - regression/chaos_peers - Executes peer chaos tests
# - regression/barebones - Executes barebones tests
# - regression/basicnetwork - Executes basicnetwork tests
# - regression/smoke - Executes smoke tests
# - upgrade - Executes upgrade scenario in weekly from 1.4 to 2.0
# - npm-init - Initializes the PTE NPM modules
# - gotools - Installs go tools, such as: ginkgo, golint, goimports, gocov and govendor
#
# ------------------------------------------------------------------
# Set PATH for Fabric binaries and FABRIC_CFG_PATH for config
PATH := $(PATH):$(PWD)/bin
FABRIC_CFG_PATH := $(PWD)/config
include gotools.mk
regression/chaos_%: pre-reqs chaos-init
cd ${@} && ginkgo -v
regression/%: pre-reqs
cd ${@} && ginkgo -v
.PHONY: regression/hsm
regression/hsm: docker
cd ${@} && ./network.sh
upgrade%:
cd regression/upgrade && ./${@}.sh
.PHONY: pre-reqs
pre-reqs: npm-init pull-binaries-fabric gotools
.PHONY: npm-init
npm-init:
cd $(CURDIR)/tools/PTE && npm install
.PHONY: lint
lint: gotools
./scripts/lint.sh
.PHONY: unit-tests
unit-tests:
@cd tools/operator && go test -cover ./...
.PHONY: pull-binaries
pull-binaries:
./scripts/pullBinaries.sh latest fabric fabric-ca
.PHONY: pull-binaries-fabric
pull-binaries-fabric:
./scripts/pullBinaries.sh latest fabric
.PHONY: pull-binaries-fabric-ca
pull-binaries-fabric-ca:
./scripts/pullBinaries.sh latest fabric-ca
.PHONY: chaos-init
chaos-init:
cd chaincodes/chaos/node && npm install && npm run build
cd tools/chaos/client/node && npm install && npm run build
cd tools/chaos/engine && npm install && npm run build
docker: docker-ca docker-orderer docker-peer docker-proxy-tools docker-proxy
docker-ca: docker-image-ca
docker-orderer: docker-image-orderer
docker-peer: docker-image-peer
docker-proxy: docker-image-proxy
docker-proxy-tools: docker-image-proxy-tools
docker-image-%:
$(eval image = ${subst docker-image-,,${@}})
cd images/${image} && docker build -t hyperledger-fabric.jfrog.io/fabric-${image}:hsm .
docker-clean:
docker rmi -f $$(docker images -f "dangling=true" -q)
build/%:
./ci/scripts/interop/${@}.sh
.PHONY: clean
clean:
rm -rf bin/ build/ config/ tools/PTE/node_modules