-
Notifications
You must be signed in to change notification settings - Fork 51
/
Makefile
85 lines (60 loc) · 2.19 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
SHELL := /bin/bash
GITCOMMIT=$(shell git describe --tags HEAD)$(shell [[ $$(git status --porcelain) = "" ]] || echo -dirty)
LDFLAGS="-X main.gitCommit=$(GITCOMMIT)"
AZURE_IMAGE ?= quay.io/openshift-on-azure/azure:$(GITCOMMIT)
LATEST_PLUGIN_VERSION=$(shell go run hack/dev-version/dev-version.go)
.PHONY: all artifacts azure-image azure-push clean create delete e2e generate monitoring monitoring-run monitoring-stop secrets sync-run test testinsights unit upgrade verify vmimage
all: azure
clean:
rm -f coverage.out azure releasenotes testinsights fakerp
generate:
@go-bindata -version
@[[ -e /var/run/secrets/kubernetes.io ]] || go generate ./...
test: unit e2e
create:
./hack/create.sh ${RESOURCEGROUP}
delete:
./hack/delete.sh ${RESOURCEGROUP}
upgrade:
./hack/upgrade.sh ${RESOURCEGROUP}
artifacts:
./hack/artifacts.sh
azure-image: azure
./hack/image-build.sh images/azure/Dockerfile $(AZURE_IMAGE)
azure-push: azure-image
docker push $(AZURE_IMAGE)
azure: generate
go build -ldflags ${LDFLAGS} ./cmd/$@
sync-run: generate
go run -ldflags ${LDFLAGS} ./cmd/azure sync --run-once --loglevel Debug
monitoring:
go build -ldflags ${LDFLAGS} ./cmd/$@
monitoring-run: monitoring
./hack/monitoring.sh
monitoring-stop:
./hack/monitoring.sh clean
releasenotes:
go build -tags releasenotes ./cmd/$@
content:
go test -timeout=300s -tags=content -run=TestContent ./pkg/sync/$(LATEST_PLUGIN_VERSION)
go run ./hack/generate-test-commands >docs/commands.md
go generate ./pkg/sync/$(LATEST_PLUGIN_VERSION)
verify:
go test -c -tags=content -run=TestContent ./pkg/sync/$(LATEST_PLUGIN_VERSION) && rm $(LATEST_PLUGIN_VERSION).test
./hack/verify/validate-generated.sh
go vet ./...
./hack/verify/validate-code-format.sh
./hack/verify/validate-util.sh
./hack/verify/validate-codecov.sh
go run ./hack/validate-imports/validate-imports.go cmd hack pkg test
go run ./hack/verify/validate_pluginconfig.go
testinsights:
go build -ldflags ${LDFLAGS} ./cmd/$@
unit: generate testinsights
go test ./... -coverprofile=coverage.out -covermode=atomic -json | ./testinsights
e2e:
FOCUS="\[CustomerAdmin\]|\[EndUser\]" TIMEOUT=60m ./hack/e2e.sh
vmimage:
./hack/vmimage.sh
vmimage-validate:
./hack/vmimage-validate.sh