forked from openshift/ibm-roks-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (46 loc) · 1.63 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
SRC_DIRS = cmd pkg
GOSEC_VERSION := v2.14.0
.PHONY: default
default: build
.PHONY: build
build: bindata control-plane-operator roks-metrics
go build -mod=vendor -o ./bin/ibm-roks github.com/openshift/ibm-roks-toolkit/cmd/ibm-roks
.PHONY: bindata
bindata:
hack/update-generated-bindata.sh
.PHONY: verify-bindata
verify-bindata:
hack/verify-generated-bindata.sh
.PHONY: verify-gofmt
verify-gofmt:
@echo Verifying gofmt
@gofmt -l -s $(SRC_DIRS)>.out 2>&1 || true
@[ ! -s .out ] || \
(echo && echo "*** Please run 'make fmt' in order to fix the following:" && \
cat .out && echo && rm .out && false)
@rm .out
.PHONY: verify-gosec
verify-gosec:
@echo Verifying gosec
@curl -sfL https://raw.githubusercontent.com/securego/gosec/${GOSEC_VERSION}/install.sh | sh -s -- -b /tmp ${GOSEC_VERSION}
@/tmp/gosec -concurrency 1 -exclude G104 ./...
.PHONY: verify
verify: verify-gofmt verify-gosec verify-bindata
# Build manager binary
.PHONY: control-plane-operator
control-plane-operator:
go build -mod=vendor -o ./bin/control-plane-operator ./cmd/control-plane-operator/main.go
.PHONY: roks-metrics
roks-metrics:
go build -mod=vendor -o ./bin/roks-metrics ./cmd/roks-metrics/main.go
go build -mod=vendor -o ./bin/metrics-pusher ./cmd/metrics-pusher/main.go
.PHONY: test-render
test-render: build
./bin/ibm-roks render --config cluster.yaml.example --output-dir manifests --pull-secret empty-pull-secret.txt
./bin/ibm-roks render --config cluster.using.konnectivity.yaml.example --output-dir manifests-konnectivity --pull-secret empty-pull-secret.txt
.PHONY: create-release
create-release:
@hack/create-release.sh
.PHONY: test
test:
./hack/test.sh